Fix for 51220 - setting flag for layout change in orientation
authorSreedeep Moulik <sreedeep.m@samsung.com>
Fri, 6 Sep 2013 09:04:13 +0000 (14:34 +0530)
committerSreedeep Moulik <sreedeep.m@samsung.com>
Fri, 6 Sep 2013 09:25:34 +0000 (14:55 +0530)
Change-Id: I75d33f099cc22e2ef54e17ba58c9d797b5353f98
Signed-off-by: Sreedeep Moulik <sreedeep.m@samsung.com>
src/ui/controls/FUiCtrl_GroupedListViewImpl.cpp
src/ui/controls/FUiCtrl_ListViewImpl.cpp
src/ui/controls/FUiCtrl_TableView.cpp
src/ui/controls/FUiCtrl_TableViewPresenter.cpp
src/ui/inc/FUiCtrl_TableView.h
src/ui/inc/FUiCtrl_TableViewPresenter.h

index 2364539..0c15dd7 100644 (file)
@@ -1938,6 +1938,11 @@ _GroupedListViewImpl::OnChangeLayout(_ControlOrientation orientation)
 {
        __isOrientationChanged = true;
 
+       if (GetCore().IsFocusModeStateEnabled())
+       {
+               GetCore().SetFocusDuringOrientationChange();
+       }
+
        _ControlImpl::OnChangeLayout(orientation);
 }
 
index 6bedcd6..f6354a9 100644 (file)
@@ -1793,6 +1793,11 @@ _ListViewImpl::OnChangeLayout(_ControlOrientation orientation)
 {
        __isOrientationChanged = true;
 
+       if (GetCore().IsFocusModeStateEnabled())
+       {
+               GetCore().SetFocusDuringOrientationChange();
+       }
+
        _ControlImpl::OnChangeLayout(orientation);
 }
 
index 3c8fd73..b597d63 100644 (file)
@@ -1428,6 +1428,12 @@ _TableView::GetVisualElementValueAnimation(const Tizen::Base::String& keyName) c
        return pAnimation;
 }
 
+void
+_TableView::SetFocusDuringOrientationChange(void)
+{
+       __pTableViewPresenter->SetFocusDuringOrientationChange();
+}
+
 bool
 _TableView::OnKeyPressed(const _Control& source, const _KeyInfo& keyInfo)
 {
index b3b1fe4..db04ae1 100644 (file)
@@ -6079,6 +6079,7 @@ _TableViewPresenter::OnDrawFocus(void)
 void
 _TableViewPresenter::OnFocusModeStateChanged(void)
 {
+       __isFocusedDuringOrientationChange = false;
        __focusItemTag.groupIndex = -1;
        __focusItemTag.itemIndex = -1;
        __isRestoreFocus = false;
@@ -6207,6 +6208,15 @@ _TableViewPresenter::FireItemTouchReleasedEventDuringPressing(int groupIndex, in
        }
 }
 
+void
+_TableViewPresenter::SetFocusDuringOrientationChange(void)
+{
+       if (__focusItemTag.groupIndex != -1)
+       {
+               __isFocusedDuringOrientationChange = true;
+       }
+}
+
 bool
 _TableViewSectionStringAlignment::operator== (const _TableViewSectionStringAlignment& rhs) const
 {
index bd69de6..daabc48 100644 (file)
@@ -238,6 +238,7 @@ public:
        virtual void OnChildDetached(const _Control& child);
 
        result SetTableViewStatusChanged(bool changed);
+       void SetFocusDuringOrientationChange(void);
 
        // VE Value Animation
        Tizen::Ui::Animations::VisualElementValueAnimation* GetVisualElementValueAnimation(const Tizen::Base::String& keyName) const;
index 1c63a60..d0a0a17 100644 (file)
@@ -305,6 +305,8 @@ public:
 
        void FireItemTouchReleasedEventDuringPressing(int groupIndex, int itemIndex);
 
+       void SetFocusDuringOrientationChange(void);
+
 protected:
        virtual float ScrollToInternal(float targetPosition);
        virtual void FadeInScrollBar(void);