Fix to setText method.

master
BenDol 10 years ago
parent 1074b6b787
commit 01e6169cfb

@ -492,7 +492,7 @@ public:
void resizeToText() { setSize(getTextSize()); }
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 setTextOffset(const Point& offset) { m_textOffset = offset; updateText(); }
void setTextWrap(bool textWrap) { m_textWrap = textWrap; updateText(); }

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

Loading…
Cancel
Save