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

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)
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];
}
......@@ -1756,6 +1756,9 @@ void CApplication::closeScenarioCB(CInterfacedScenario* pInterfacedScenario)
resetVolatileScenarioDirectoryToken();
changeCurrentScenario(-1);
}
else{
changeCurrentScenario(static_cast<uint32>(gtk_notebook_get_current_page(m_pScenarioNotebook)));
}
}
}
......
Markdown is supported
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