fixed bug (N_SE-50040)
authorChulheon <ch.jeong47@samsung.com>
Thu, 29 Aug 2013 05:58:36 +0000 (14:58 +0900)
committerChulheon <ch.jeong47@samsung.com>
Thu, 29 Aug 2013 05:58:36 +0000 (14:58 +0900)
Change-Id: I6a48bf727b8df51a1cad0193425ac4f9d7b21a33

src/ui/controls/FUiCtrl_EditCopyPasteManager.cpp

index 2a1e229..ff90611 100644 (file)
@@ -1799,6 +1799,8 @@ _EditCopyPasteManager::CreateCopyPastePopup(void)
        FloatRectangle formClientBounds(0.0f, 0.0f, 0.0f, 0.0f);
        FloatRectangle panelAbsoulteBounds(0.0f, 0.0f, 0.0f, 0.0f);
        bool commandButtonExist = false;
+       bool formExist = false;
+       bool panelExist = false;
        FloatRectangle cursorRect = GetCursorBoundsF(true);
 
        float contextMenuHeight = 0.0f;
@@ -1828,7 +1830,6 @@ _EditCopyPasteManager::CreateCopyPastePopup(void)
        }
 
        GET_SHAPE_CONFIG(EDIT::COPYPASTE_HANDLER_HEIGHT, orientation, handlerHeight);
-
        GET_SHAPE_CONFIG(CONTEXTMENU::GRID_ITEM_HEIGHT, orientation, contextMenuHeight);
        GET_SHAPE_CONFIG(CONTEXTMENU::GRID_TOP_MARGIN, orientation, contextMenuTopMargin);
        GET_SHAPE_CONFIG(CONTEXTMENU::GRID_BOTTOM_MARGIN, orientation, contextMenuBottomMargin);
@@ -1863,11 +1864,13 @@ _EditCopyPasteManager::CreateCopyPastePopup(void)
        if (pForm)
        {
                formClientBounds = pForm->GetClientBoundsF();
+               formExist = true;
        }
        _ScrollPanel* pPanel = __pEditPresenter->GetParentPanel();
        if (pPanel)
        {
                panelAbsoulteBounds = pPanel->GetAbsoluteBoundsF(true);
+               panelExist = true;
        }
        __pEdit->GetKeypadBounds(keypadBounds);
 
@@ -1887,6 +1890,11 @@ _EditCopyPasteManager::CreateCopyPastePopup(void)
                                editShowAreaAbsRect.height = textObjectBounds.height;
                        }
                }
+               if (editShowAreaAbsRect.y < 0.0f)
+               {
+                       editShowAreaAbsRect.height += editShowAreaAbsRect.y;
+                       editShowAreaAbsRect.y = 0.0f;
+               }
 
                if (commandButtonExist)
                {
@@ -1902,15 +1910,21 @@ _EditCopyPasteManager::CreateCopyPastePopup(void)
                                editShowAreaAbsRect.height -= (editShowAreaAbsRect.y + editShowAreaAbsRect.height - keypadBounds.y);
                        }
                }
-               if (editShowAreaAbsRect.y < formClientBounds.y)
+               if (formExist)
                {
-                       editShowAreaAbsRect.y = formClientBounds.y;
-                       editShowAreaAbsRect.height -= formClientBounds.y;
+                       if (editShowAreaAbsRect.y < formClientBounds.y)
+                       {
+                               editShowAreaAbsRect.y = formClientBounds.y;
+                               editShowAreaAbsRect.height -= formClientBounds.y;
+                       }
                }
-               if (editShowAreaAbsRect.y < panelAbsoulteBounds.y)
+               if (panelExist)
                {
-                       editShowAreaAbsRect.y = panelAbsoulteBounds.y;
-                       editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y);
+                       if (editShowAreaAbsRect.y < panelAbsoulteBounds.y)
+                       {
+                               editShowAreaAbsRect.y = panelAbsoulteBounds.y;
+                               editShowAreaAbsRect.height -= (panelAbsoulteBounds.y - editShowAreaAbsRect.y);
+                       }
                }
                __editVisibleArea = CoordinateSystem::AlignToDevice(editShowAreaAbsRect);
        }