}
}
+ //Remove Scene
+ RemoveSceneFromContainer(sceneId);
+
if (isFormScene)
- { // 1. Remove Form control(Associated on Scene) from Frame
- RemoveControlFromFrame(*pScene->GetForm());
- // 2. Remove Form from Form container
+ { // 1. Remove Form from Form container
RemoveFormFromFormContainer(pScene->GetFormId());
+ // 2. Remove Form control(Associated on Scene) from Frame
+ RemoveControlFromFrame(*pScene->GetForm());
}
else
if (isLastPanel)
{ // 1. Remove Panel from Panel container.
RemovePanelFromPanelContainer(pScene);
- // 2. Remove Form control from Frame. (Associated Panel automatically removed by Ui)
- RemoveControlFromFrame(*pScene->GetForm());
- // 3. Remove Form from Form container.
+ // 2. Remove Form from Form container.
RemoveFormFromFormContainer(pScene->GetFormId());
+ // 3. Remove Form control from Frame. (Associated Panel automatically removed by Ui)
+ RemoveControlFromFrame(*pScene->GetForm());
}
else
{ // 1. Remove Panel from Panel container.
RemoveControlFromForm(*pScene->GetForm(), *pScene->GetPanel());
}
}
-
- // Finally remove Scene
- RemoveSceneFromContainer(sceneId);
delete pScene;
return E_SUCCESS;