Commit 6d2e79fa authored by Serrière Guillaume's avatar Serrière Guillaume
Browse files

Designer: Update the current scenario when a scenario is deleted.


Signed-off-by: default avatarSerrière Guillaume <guillaume.serriere@inria.fr>
parent 131610c8
...@@ -1254,7 +1254,7 @@ boolean CApplication::hasUnsavedScenario(void) ...@@ -1254,7 +1254,7 @@ boolean CApplication::hasUnsavedScenario(void)
CInterfacedScenario* CApplication::getCurrentInterfacedScenario(void) CInterfacedScenario* CApplication::getCurrentInterfacedScenario(void)
{ {
if(m_i32CurrentScenarioPage<static_cast<int32>(m_vInterfacedScenario.size()) && m_i32CurrentScenarioPage >= 0) if(m_i32CurrentScenarioPage < static_cast<int32>(m_vInterfacedScenario.size()) && m_i32CurrentScenarioPage >= 0)
{ {
return m_vInterfacedScenario[m_i32CurrentScenarioPage]; return m_vInterfacedScenario[m_i32CurrentScenarioPage];
} }
...@@ -1756,6 +1756,9 @@ void CApplication::closeScenarioCB(CInterfacedScenario* pInterfacedScenario) ...@@ -1756,6 +1756,9 @@ void CApplication::closeScenarioCB(CInterfacedScenario* pInterfacedScenario)
resetVolatileScenarioDirectoryToken(); resetVolatileScenarioDirectoryToken();
changeCurrentScenario(-1); changeCurrentScenario(-1);
} }
else{
changeCurrentScenario(static_cast<uint32>(gtk_notebook_get_current_page(m_pScenarioNotebook)));
}
} }
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment