src/hbcore/gui/hbscreen.cpp
changeset 21 4633027730f5
parent 7 923ff622b8b9
--- a/src/hbcore/gui/hbscreen.cpp	Tue Jul 06 14:36:53 2010 +0300
+++ b/src/hbcore/gui/hbscreen.cpp	Wed Aug 18 10:05:37 2010 +0300
@@ -152,12 +152,8 @@
     mScreenPolished = true;
     HbWidget::polish(params);
 
-    if (mTb && mDelayedConstructionHandled) {
-        HbToolBarPrivate::d_ptr(mTb)->mDoLayout = true;
-    }
-    if (layout()) {
-        layout()->activate();
-    }
+    prepareGeometryChange();
+
     HbMainWindow *w = mainWindow();
     HbMainWindowPrivate::d_ptr(w)->postIdleEvent(HbMainWindowPrivate::IdleOrientationEvent);
 }
@@ -171,7 +167,6 @@
     if (mTb) {
         connect(&HbToolBarPrivate::d_ptr(mTb)->core, SIGNAL(orientationChanged()), this, SLOT(toolBarOrientationChanged()));
         connect(&HbToolBarPrivate::d_ptr(mTb)->core, SIGNAL(visibilityChanged()), this, SLOT(decoratorVisibilityChanged()));
-        HbToolBarPrivate::d_ptr(mTb)->delayedConstruction();
     }
     if (mDock) {
         connect(&HbDockWidgetPrivate::d_ptr(mDock)->core, SIGNAL(visibilityChanged()), this, SLOT(decoratorVisibilityChanged()));
@@ -248,7 +243,6 @@
 {
     if (orientation != mToolBarOrientation) {
         if (mTb) {
-            HbToolBarPrivate::d_ptr(mTb)->mDoLayout = false;
             repolish();
         }
         mToolBarOrientation = orientation;
@@ -263,11 +257,7 @@
             && mScreenOrientation != HbMainWindowPrivate::d_ptr(window)->mOrientation) {
         return;
     }
-    if (mTb) {
-        HbToolBarPrivate::d_ptr(mTb)->mDoLayout = false;
-    }
     repolish();
-    QCoreApplication::sendPostedEvents(this, QEvent::Polish);
 }
 
 void HbScreen::currentViewChanged(HbView *view)