summaryrefslogtreecommitdiffstats
path: root/gui/text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/text.cpp')
-rw-r--r--gui/text.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gui/text.cpp b/gui/text.cpp
index dc7a2d119..1eceab1f5 100644
--- a/gui/text.cpp
+++ b/gui/text.cpp
@@ -165,7 +165,10 @@ int GUIText::Update(void)
if (mIsStatic || !mVarChanged) return 0;
std::string newValue = parseText();
- if (mLastValue == newValue) return 0;
+ if (mLastValue == newValue)
+ return 0;
+ else
+ mLastValue = newValue;
return 2;
}
@@ -176,6 +179,7 @@ int GUIText::GetCurrentBounds(int& w, int& h)
if (mFont) fontResource = mFont->GetResource();
h = mFontHeight;
+ mLastValue = parseText();
w = gr_measureEx(mLastValue.c_str(), fontResource);
return 0;
}