X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgetscreen.cpp;h=297c65beaf67e137e0a61b2c410f80e108b40bdc;hb=9a414baa2137bf27f1db316152394ae15578cc9e;hp=e78afa2257cfc10f3be373ac1d03581caf2151d5;hpb=2f4e1187223b724dc371391718bd98512d008645;p=jspeed diff --git a/src/widgetscreen.cpp b/src/widgetscreen.cpp index e78afa2..297c65b 100644 --- a/src/widgetscreen.cpp +++ b/src/widgetscreen.cpp @@ -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,14 @@ void WidgetScreen::reArrange() { if(screens_.find(o) != screens_.end()) { + currentOrientation_ = o; setCurrentWidget(screens_[o]); screens_[o]->reArrange(); - screens_[o]->forceRepaint(); - currentOrientation_ = o; + + if(o == LANDSCAPE) + { + screens_[o]->forceRepaint(); + } } } }