diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 6ae4c588..81f54212 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -217,6 +217,7 @@ void BrowserBox::addRow(const std::string &row) { setHeight(font->getHeight() * static_cast<int>(mTextRows.size())); } + mUpdateTime = 0; updateHeight(); } @@ -513,7 +514,7 @@ int BrowserBox::calcHeight() void BrowserBox::updateHeight() { - if (mAlwaysUpdate || std::abs(mUpdateTime - tick_time) > 10 + if (mAlwaysUpdate || !mUpdateTime || std::abs(mUpdateTime - tick_time) > 10 || mTextRows.size() < 3) { mWidth = getWidth(); @@ -521,8 +522,4 @@ void BrowserBox::updateHeight() setHeight(mHeight); mUpdateTime = tick_time; } - else if (!mUpdateTime) - { - mUpdateTime = tick_time; - } } |