diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-18 02:32:32 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-18 02:32:32 +0300 |
commit | 4a819f03a40d0a402fda465dc3656cfe53317384 (patch) | |
tree | bb16c94679f17480fbc0b7d7b989773a8af73f2d /src/gui/widgets/browserbox.cpp | |
parent | be8edccc37bb2ce0b17cc950129cd57d65aac49a (diff) | |
download | manaplus-4a819f03a40d0a402fda465dc3656cfe53317384.tar.gz manaplus-4a819f03a40d0a402fda465dc3656cfe53317384.tar.bz2 manaplus-4a819f03a40d0a402fda465dc3656cfe53317384.tar.xz manaplus-4a819f03a40d0a402fda465dc3656cfe53317384.zip |
Fix asserts in browserbox on resize.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index f9ad9fc83..a4f6de473 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -65,6 +65,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget, const std::string &skin) : Widget(widget), MouseListener(), + WidgetListener(), mTextRows(), mTextRowLinksCount(), mLineParts(), @@ -98,6 +99,7 @@ BrowserBox::BrowserBox(const Widget2 *const widget, setFocusable(true); addMouseListener(this); + addWidgetListener(this); mBackgroundColor = getThemeColor(ThemeColorId::BACKGROUND); @@ -954,3 +956,8 @@ void BrowserBox::selectSelection() mLinkHandler->handleLink(mLinks[CAST_SIZE(mSelectedLink)].link, nullptr); } + +void BrowserBox::widgetResized(const Event &event A_UNUSED) +{ + updateHeight(); +} |