summaryrefslogtreecommitdiffstats
path: root/gui/text.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@yahoo.com>2013-03-24 14:54:55 +0100
committerDees_Troy <dees_troy@yahoo.com>2013-03-30 14:56:39 +0100
commita13d74fc95324c4318fcc95956b07fe593669412 (patch)
tree74654a9fae5e24e346842da733d68a70c5bfb716 /gui/text.cpp
parentAdd search function to libtar (diff)
downloadandroid_bootable_recovery-a13d74fc95324c4318fcc95956b07fe593669412.tar
android_bootable_recovery-a13d74fc95324c4318fcc95956b07fe593669412.tar.gz
android_bootable_recovery-a13d74fc95324c4318fcc95956b07fe593669412.tar.bz2
android_bootable_recovery-a13d74fc95324c4318fcc95956b07fe593669412.tar.lz
android_bootable_recovery-a13d74fc95324c4318fcc95956b07fe593669412.tar.xz
android_bootable_recovery-a13d74fc95324c4318fcc95956b07fe593669412.tar.zst
android_bootable_recovery-a13d74fc95324c4318fcc95956b07fe593669412.zip
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;
}