Fixed logic that setting current form when minimized mode.
authorKeuckdo Bang <keuckdo.bang@samsung.net>
Wed, 24 Apr 2013 06:18:47 +0000 (15:18 +0900)
committerKeuckdo Bang <keuckdo.bang@samsung.net>
Wed, 24 Apr 2013 06:18:47 +0000 (15:18 +0900)
Change-Id: I059d4a6a13e75fb50e6360e0e3b495efc668c6e9

src/ui/controls/FUiCtrl_Frame.cpp
src/ui/controls/FUiCtrl_FrameImpl.cpp
src/ui/inc/FUiCtrl_Frame.h

index 262a974..6230426 100644 (file)
@@ -579,11 +579,18 @@ _Frame::SetShowMode(FrameShowMode showMode)
 }
 
 FrameShowMode
-_Frame::GetShowMode(void) const
+_Frame::GetShowMode(bool minimize) const
 {
-       if (__minimized == true)
+       if (minimize)
        {
-               return FRAME_SHOW_MODE_MINIMIZED;
+               if (__minimized == true)
+               {
+                       return FRAME_SHOW_MODE_MINIMIZED;
+               }
+               else
+               {
+                       return __showMode;
+               }
        }
        else
        {
index 32bd917..ca4912d 100644 (file)
@@ -171,9 +171,20 @@ _FrameImpl::SetCurrentForm(const _FormImpl& formImpl)
                IsAncestorOf(pNewCurForm), E_INVALID_ARG,
                E_INVALID_ARG, "[E_INVALID_ARG] The Form is not the child of this Frame.");
 
-       if (GetCore().GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN)
+       FrameShowMode showMode = GetCore().GetShowMode();
+       if (showMode != FRAME_SHOW_MODE_FULL_SCREEN)
        {
-               SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form.");
+               if (showMode == FRAME_SHOW_MODE_MINIMIZED)
+               {
+                       if (GetCore().GetShowMode(false) != FRAME_SHOW_MODE_FULL_SCREEN)
+                       {
+                               SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form.");
+                       }
+               }
+               else
+               {
+                       SysTryReturn(NID_UI_CTRL, !(pNewCurForm->GetFormStyle() & FORM_STYLE_INDICATOR), E_INVALID_ARG, E_INVALID_ARG, "Only Frame whose show mode is @c FRAME_SHOW_MODE_FULL_SCREEN can set a Form which has the style of @c FORM_STYLE_INDICATOR as the current form.");
+               }
        }
 
 
index fa2d41a..d9b4f2c 100644 (file)
@@ -85,7 +85,7 @@ public:
        void SetFloatingBounds(const Tizen::Graphics::Rectangle& rect);
        void SetFloatingBounds(const Tizen::Graphics::FloatRectangle& rect);
        result SetShowMode(FrameShowMode showMode);
-       FrameShowMode GetShowMode(void) const;
+       FrameShowMode GetShowMode(bool minimize = true) const;
        bool IsActivated(void) const;
 
 // Focus Ui