diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-21 21:22:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-21 21:22:17 +0300 |
commit | 773ef01f1490f0884836a9d08f75938eb8742c8e (patch) | |
tree | dc7ccb40d39cf7ad4b712a342407257671962205 /src/gui/widgets/basiccontainer.cpp | |
parent | c66f0547024b54c1a944746e947328c4e7fa56ae (diff) | |
download | mv-773ef01f1490f0884836a9d08f75938eb8742c8e.tar.gz mv-773ef01f1490f0884836a9d08f75938eb8742c8e.tar.bz2 mv-773ef01f1490f0884836a9d08f75938eb8742c8e.tar.xz mv-773ef01f1490f0884836a9d08f75938eb8742c8e.zip |
Add parent window field to all widgets.
Diffstat (limited to 'src/gui/widgets/basiccontainer.cpp')
-rw-r--r-- | src/gui/widgets/basiccontainer.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/widgets/basiccontainer.cpp b/src/gui/widgets/basiccontainer.cpp index 64cb650cd..271d11925 100644 --- a/src/gui/widgets/basiccontainer.cpp +++ b/src/gui/widgets/basiccontainer.cpp @@ -250,6 +250,7 @@ void BasicContainer::add(Widget *const widget) widget->setFocusHandler(mInternalFocusHandler); widget->setParent(this); + widget->setWindow(getWindow()); widget->addDeathListener(this); } @@ -261,6 +262,7 @@ void BasicContainer::remove(Widget* widget) { mWidgets.erase(iter); widget->setFocusHandler(nullptr); + widget->setWindow(nullptr); widget->setParent(nullptr); widget->removeDeathListener(this); break; @@ -282,6 +284,7 @@ void BasicContainer::clear() { Widget *const widget = *iter; widget->setFocusHandler(nullptr); + widget->setWindow(nullptr); widget->setParent(nullptr); widget->removeDeathListener(this); } |