Fix to setText method.

This commit is contained in:
BenDol 2014-04-04 04:49:44 +13:00
parent 1074b6b787
commit 01e6169cfb
2 changed files with 3 additions and 3 deletions

View File

@ -492,7 +492,7 @@ public:
void resizeToText() { setSize(getTextSize()); } void resizeToText() { setSize(getTextSize()); }
void clearText() { setText(""); } void clearText() { setText(""); }
void setText(std::string text, bool fireLuaCall = true); void setText(std::string text, bool dontFireLuaCall = false);
void setTextAlign(Fw::AlignmentFlag align) { m_textAlign = align; updateText(); } void setTextAlign(Fw::AlignmentFlag align) { m_textAlign = align; updateText(); }
void setTextOffset(const Point& offset) { m_textOffset = offset; updateText(); } void setTextOffset(const Point& offset) { m_textOffset = offset; updateText(); }
void setTextWrap(bool textWrap) { m_textWrap = textWrap; updateText(); } void setTextWrap(bool textWrap) { m_textWrap = textWrap; updateText(); }

View File

@ -112,7 +112,7 @@ void UIWidget::onFontChange(const std::string& font)
callLuaField("onFontChange", font); callLuaField("onFontChange", font);
} }
void UIWidget::setText(std::string text, bool fireLuaCall) void UIWidget::setText(std::string text, bool dontFireLuaCall)
{ {
if(m_textOnlyUpperCase) if(m_textOnlyUpperCase)
stdext::toupper(text); stdext::toupper(text);
@ -126,7 +126,7 @@ void UIWidget::setText(std::string text, bool fireLuaCall)
text = m_text; text = m_text;
if(fireLuaCall) { if(!dontFireLuaCall) {
onTextChange(text, oldText); onTextChange(text, oldText);
} }
} }