diff options
author | Torbjörn Andersson | 2006-05-19 22:41:51 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-05-19 22:41:51 +0000 |
commit | ce749cd44cfab0f5a75cfdd8b96a14f5c3ea1b68 (patch) | |
tree | 18e32ac30a60171b06007c32d7c496f9b2c00ae4 /gui | |
parent | 84c649c4a9f6e81e4f9c38f358267c387f8078bd (diff) | |
download | scummvm-rg350-ce749cd44cfab0f5a75cfdd8b96a14f5c3ea1b68.tar.gz scummvm-rg350-ce749cd44cfab0f5a75cfdd8b96a14f5c3ea1b68.tar.bz2 scummvm-rg350-ce749cd44cfab0f5a75cfdd8b96a14f5c3ea1b68.zip |
Call handleScreenChanged() *before* calling setEditString(). Otherwise
_leftPadding may be wrong, or even undefined, when getEditRect() is called,
which may cause ScummVM to trigger an "invalid rect" assertion.
svn-id: r22536
Diffstat (limited to 'gui')
-rw-r--r-- | gui/EditTextWidget.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gui/EditTextWidget.cpp b/gui/EditTextWidget.cpp index 5499d655fe..277b69bc74 100644 --- a/gui/EditTextWidget.cpp +++ b/gui/EditTextWidget.cpp @@ -32,9 +32,8 @@ EditTextWidget::EditTextWidget(GuiObject *boss, int x, int y, int w, int h, cons _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS | WIDGET_WANT_TICKLE; _type = kEditTextWidget; - setEditString(text); - handleScreenChanged(); + setEditString(text); } EditTextWidget::EditTextWidget(GuiObject *boss, String name, const String &text) @@ -43,9 +42,8 @@ EditTextWidget::EditTextWidget(GuiObject *boss, String name, const String &text) _type = kEditTextWidget; _hints |= THEME_HINT_USE_SHADOW; - setEditString(text); - handleScreenChanged(); + setEditString(text); } void EditTextWidget::setEditString(const String &str) { |