summaryrefslogtreecommitdiff
path: root/noncore/graphics/drawpad/drawpad.cpp
authormickeyl <mickeyl>2004-05-13 21:56:23 (UTC)
committer mickeyl <mickeyl>2004-05-13 21:56:23 (UTC)
commitf005863ac3e3106f3da9fd337ab0a20da0cd4b83 (patch) (unidiff)
treeb633e278659c87b7bc964bb5ea80d46131798960 /noncore/graphics/drawpad/drawpad.cpp
parent6841da6429d864d5554c5a16e87c2755fe96343b (diff)
downloadopie-f005863ac3e3106f3da9fd337ab0a20da0cd4b83.zip
opie-f005863ac3e3106f3da9fd337ab0a20da0cd4b83.tar.gz
opie-f005863ac3e3106f3da9fd337ab0a20da0cd4b83.tar.bz2
BUGFIX for 1314: Fix page initialization on first start of drawpad.
Problem was caused by a race condition. Developers: If you have todo initializations which depend on the widget layout being finished, _don't_ do this in the widget constructor but in a callback from the mainloop, i.e. via QTimer::singleShot( 10, this, SLOT( myInitialization() ) );
Diffstat (limited to 'noncore/graphics/drawpad/drawpad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/graphics/drawpad/drawpad.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/graphics/drawpad/drawpad.cpp b/noncore/graphics/drawpad/drawpad.cpp
index d9d0ce0..c0f42d9 100644
--- a/noncore/graphics/drawpad/drawpad.cpp
+++ b/noncore/graphics/drawpad/drawpad.cpp
@@ -51,3 +51,2 @@
51using namespace Opie::Ui; 51using namespace Opie::Ui;
52using namespace Opie::Ui;
53DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ ) 52DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ )
@@ -283,3 +282,6 @@ DrawPad::DrawPad(QWidget* parent, const char* name, WFlags /*fl*/ )
283 282
284 finishStartup(); 283 // delay the rest of the initialization and do it from within the mainloop
284 // if we don't do this, the widget layout may not be constructed upon
285 // and we will end up with a wrong QScrollview page size (Mickeyl)
286 QTimer::singleShot( 100, this, SLOT( finishStartup() ) );
285} 287}