summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2010-10-01 18:05:31 +0300
committerAndrei Karas <akaras@inbox.ru>2010-10-01 18:25:41 +0300
commitfd20b774bf057502ea04090051fad2c5c9351c74 (patch)
tree52cbc55609b96cfc4c68f3dfebe7958682b83b41 /src/gui
parentbf8893f83b4b5e55e74e9b1ed4e8f06bc0315aa7 (diff)
downloadmana-client-fd20b774bf057502ea04090051fad2c5c9351c74.tar.gz
mana-client-fd20b774bf057502ea04090051fad2c5c9351c74.tar.bz2
mana-client-fd20b774bf057502ea04090051fad2c5c9351c74.tar.xz
mana-client-fd20b774bf057502ea04090051fad2c5c9351c74.zip
Fix possible invisible chat.
Reviewed-by: Thorbjorn
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/widgets/browserbox.cpp7
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;
- }
}