Commit 89b90acc authored by Jussi Lindgren's avatar Jussi Lindgren

Designer: Fixed issue with restoring nonsaved state

parent a1f84e4c
......@@ -156,6 +156,8 @@ CBoxConfigurationDialog::CBoxConfigurationDialog(const IKernelContext& rKernelCo
//if we are in a running scenario, we just need the WidgetToReturn and can destroy the rest
if (m_bIsScenarioRunning)
{
m_rBox.storeState();
//unparent widget
::GtkWidget* l_pWidgetParent = gtk_widget_get_parent(m_pWidgetToReturn);
if(GTK_IS_CONTAINER(l_pWidgetParent))
......
......@@ -1347,6 +1347,11 @@ void CBox::storeState(void)
void CBox::restoreState(void)
{
if(!m_pSavedState)
{
this->getLogManager() << LogLevel_Warning << "Tried to restore state with no state saved\n";
return;
}
this->initializeFromExistingBox(*m_pSavedState);
}
......
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