Prevent issue fix. 2Nabi issues fixed
[apps/osp/Call.git] / src / CallActiveCallForm.cpp
index b9884d3..11ef10b 100644 (file)
@@ -224,8 +224,12 @@ ActiveCallForm::ShowDTMFKeypad(void)
                        pRelativeLayout->SetRelation(*__pDTMFKeypad, __pCallButtonsPanel, RECT_EDGE_RELATION_RIGHT_TO_LEFT);
                }
        }
-       EditField* pTextBox = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX));
        __pDTMFKeypad->SetShowState(true);
+       if(__DtmfString.IsEmpty() == false)
+       {
+               EditField* pTextBox = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX));
+               pTextBox->SetText(__DtmfString);
+       }
        __pDTMFKeypad->Draw(true);
        __pDTMFKeypad->Show();
 }
@@ -270,11 +274,12 @@ ActiveCallForm::OnOrientationChanged(const Tizen::Ui::Control& source, Tizen::Ui
                                //in Portrait mode it is hidden beneath DTMF Keypad.
                                SetShowStateOnKeypad(false);
                        }
-                       String dtmfText = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX))->GetText();
-                       ShowDTMFKeypad();
-                       //get new text box.
-                       EditField* pTextBox = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX));
-                       pTextBox->SetText(dtmfText);
+                       if(__pDTMFKeypad->GetShowState() == true)
+                       {
+                               String dtmfText = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX))->GetText();
+                               HideDTMFKeypad();
+                               ShowDTMFKeypad();
+                       }
                }
        }
        //More option is displayed recreate it
@@ -290,9 +295,10 @@ ActiveCallForm::HideDTMFKeypad(void)
 {
        if(__pDTMFKeypad != null)
        {
-               __pDTMFKeypad->SetShowState(false);
-               __pDTMFKeypad->Draw(true);
-               __pDTMFKeypad->Show();
+               __DtmfString = static_cast<EditField*>(__pDTMFKeypad->GetControl(IDC_TEXTBOX))->GetText();
+
+               RemoveControl(*__pDTMFKeypad);
+               __pDTMFKeypad = null;
        }
 }
 
@@ -1063,6 +1069,7 @@ ActiveCallForm::OnSceneDeactivated(const SceneId& currentSceneId, const SceneId&
        {
                __pMoreOptionsList->SetShowState(false);
        }
+       __DtmfString.Clear();
 }
 
 void
@@ -1190,6 +1197,10 @@ ActiveCallForm::UpdateMultipleCallScreen(Tizen::Base::Collection::IListT<AppCall
                                        pMoreBtn->SetShowState(false);
                                }
                                ShowPersonDetails(contactNo, IDC_NUMBER1_LABEL, IDC_CALLER1_LABEL, false,__pActiveCallInfo);
+                               if(__pMoreOptionsListAnchor != null && __pMoreOptionsListAnchor->GetShowState() == true)
+                               {
+                                       CreateMoreOptionsMenuList();
+                               }
                        }
                        else
                        {
@@ -1826,7 +1837,7 @@ ActiveCallForm::CreateItem(int index, int itemWidth)
        pTextElement->SetFont(font);
        //construct Enriched text
        EnrichedText* pEnrichedText = new (std::nothrow) EnrichedText();
-       Dimension textDimension;
+       FloatDimension textDimension;
        font.GetTextExtent(confCallName, confCallName.GetLength(), textDimension);
        textDimension.height = textDimension.height + font.GetDescender();
        pEnrichedText->Construct(textDimension);
@@ -1834,8 +1845,8 @@ ActiveCallForm::CreateItem(int index, int itemWidth)
        pEnrichedText->Add(*pTextElement);
 
        //Add Enriched text to pItem
-       Point textPos(((2 * IDI_OPTIONMENU_ITEM_SPACING) + W_MGR_CONFCALL_BITMAP), ((IDI_OPTIONMENU_DIMEN.height - textDimension.height) / 2));
-       pItem->AddElement(Rectangle(textPos, textDimension), 2, *pEnrichedText);
+       FloatPoint textPos(((2 * IDI_OPTIONMENU_ITEM_SPACING) + W_MGR_CONFCALL_BITMAP), ((IDI_OPTIONMENU_DIMEN.height - textDimension.height) / 2));
+       pItem->AddElement(FloatRectangle(textPos, textDimension), 2, *pEnrichedText);
        // Cleans up
        pEnrichedText->RemoveAll(true);
        delete pEnrichedText;