Changed app to use Qt Mobility in screen rotation instead of default Qt screen rotation.
[jspeed] / src / widgetscreen.cpp
index e78afa2..120de24 100644 (file)
@@ -44,14 +44,15 @@ bool WidgetScreen::load(Orientation orientation, QDomNode const& data, Reader* r
 
     bool ret = screens_[orientation]->load(data, reader);
 
-    if(ret && screens_.size() == 1)
-    {
-        currentOrientation_ = orientation;
-    }
-
     if(ret)
     {
         loadedScreens_.insert(orientation);
+
+        if(loadedScreens_.size() == 1)
+        {
+            currentOrientation_ = orientation;
+            setCurrentWidget(screens_[orientation]);
+        }
     }
 
     return ret;
@@ -118,10 +119,10 @@ void WidgetScreen::reArrange()
     {
         if(screens_.find(o) != screens_.end())
         {
-            setCurrentWidget(screens_[o]);
+            currentOrientation_ = o;
             screens_[o]->reArrange();
+            setCurrentWidget(screens_[o]);
             screens_[o]->forceRepaint();
-            currentOrientation_ = o;
         }
     }
 }