summaryrefslogtreecommitdiff
path: root/src/gui/widgets/browserbox.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-18 02:32:32 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-18 02:32:32 +0300
commit4a819f03a40d0a402fda465dc3656cfe53317384 (patch)
treebb16c94679f17480fbc0b7d7b989773a8af73f2d /src/gui/widgets/browserbox.cpp
parentbe8edccc37bb2ce0b17cc950129cd57d65aac49a (diff)
downloadplus-4a819f03a40d0a402fda465dc3656cfe53317384.tar.gz
plus-4a819f03a40d0a402fda465dc3656cfe53317384.tar.bz2
plus-4a819f03a40d0a402fda465dc3656cfe53317384.tar.xz
plus-4a819f03a40d0a402fda465dc3656cfe53317384.zip
Fix asserts in browserbox on resize.
Diffstat (limited to 'src/gui/widgets/browserbox.cpp')
-rw-r--r--src/gui/widgets/browserbox.cpp7
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();
+}