Tizen 2.2.1
[framework/osp/web.git] / src / controls / FWebCtrl_SelectBox.cpp
index 737bb5e..ac80e60 100755 (executable)
@@ -148,7 +148,6 @@ _SelectBox::_SelectBox(void)
        , __multiSelection(false)
        , __SelectedIndex(-1)
        , __prevIndex(-1)
-       , __panelHeight(0)
        , __orientation(_CONTROL_ORIENTATION_PORTRAIT)
        , __pWebView(null)
        , __pToggledArray(null)
@@ -230,18 +229,16 @@ _SelectBox::Construct(Tizen::Web::Controls::_WebImpl* pImpl, bool isMultiSelect,
                Panel* pButtonPanel = CreateAndAddPanel();
                SysTryReturn(NID_WEB_CTRL, pButtonPanel, r = GetLastResult(), r, "[%s] Propagating.", GetErrorMessage(r));
 
-               __panelHeight = pButtonPanel->GetHeight();
-
                _SystemResource* pSysResource = _SystemResource::GetInstance();
                SysAssertf(pSysResource != null, "Failed to get _SystemResource instance");
 
-               ArrayList idList(SingleObjectDeleter);
+               ArrayList idList;
                r = idList.Construct();
                SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
                idList.Add(*(new Integer(ID_BUTTON_SELECTION)));
 
-               ArrayList titleList(SingleObjectDeleter);
+               ArrayList titleList;
                r = titleList.Construct();
                SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
 
@@ -252,8 +249,6 @@ _SelectBox::Construct(Tizen::Web::Controls::_WebImpl* pImpl, bool isMultiSelect,
 
                r = CreateAndAddButtons(idList, titleList, pButtonPanel);
                SysTryReturn(NID_WEB_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
-
-               SetSize(GetSize().width,GetSize().height + __panelHeight);
        }
 
        SetPropagatedKeyEventListener(this);
@@ -603,23 +598,6 @@ _SelectBox::UpdateList(Eina_List* pItems, int prevIndex, bool clearPrevList, boo
                }
        }
 
-       int listItemHeight = 0;
-       GET_SHAPE_CONFIG(CONTEXTMENU::LIST_ITEM_HEIGHT, __orientation, listItemHeight);
-       int prevCount = (__pListView->GetSize()).height / listItemHeight;
-       int defaultCount = __multiSelection ? DEFAULT_LIST_ITEM_COUNT -1 : DEFAULT_LIST_ITEM_COUNT;
-
-       if ((prevCount != itemCount)
-               && ((prevCount < defaultCount && itemCount < defaultCount)
-               || (prevCount < defaultCount && itemCount >= defaultCount)
-               || (prevCount >= defaultCount && itemCount < defaultCount)))
-       {
-               int listViewNewHeight = ((itemCount < defaultCount) ? itemCount : defaultCount) * listItemHeight;
-               int popupHeight = __multiSelection ? (listViewNewHeight + __panelHeight) : listViewNewHeight;
-
-               __pListView->SetSize((__pListView->GetSize()).width, listViewNewHeight);
-               SetSize(GetSize().width, popupHeight);
-       }
-
        __pListView->UpdateList();
 
        return E_SUCCESS;