ENABLE_GCODE_VIEWER_AS_STATE -> Smoother transition between states
This commit is contained in:
parent
ea0e9a5873
commit
9f94f89808
1 changed files with 8 additions and 0 deletions
|
@ -1163,6 +1163,8 @@ void MainFrame::set_mode(EMode mode)
|
||||||
{
|
{
|
||||||
m_plater->reset();
|
m_plater->reset();
|
||||||
|
|
||||||
|
m_plater->Freeze();
|
||||||
|
|
||||||
// switch view
|
// switch view
|
||||||
m_plater->select_view_3D("3D");
|
m_plater->select_view_3D("3D");
|
||||||
m_plater->select_view("iso");
|
m_plater->select_view("iso");
|
||||||
|
@ -1187,6 +1189,8 @@ void MainFrame::set_mode(EMode mode)
|
||||||
m_restore_from_gcode_viewer.collapsed_sidebar = false;
|
m_restore_from_gcode_viewer.collapsed_sidebar = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_plater->Thaw();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case EMode::GCodeViewer:
|
case EMode::GCodeViewer:
|
||||||
|
@ -1194,6 +1198,8 @@ void MainFrame::set_mode(EMode mode)
|
||||||
m_plater->reset();
|
m_plater->reset();
|
||||||
m_plater->reset_last_loaded_gcode();
|
m_plater->reset_last_loaded_gcode();
|
||||||
|
|
||||||
|
m_plater->Freeze();
|
||||||
|
|
||||||
// reinitialize undo/redo stack
|
// reinitialize undo/redo stack
|
||||||
m_plater->clear_undo_redo_stack_main();
|
m_plater->clear_undo_redo_stack_main();
|
||||||
m_plater->take_snapshot(_L("New Project"));
|
m_plater->take_snapshot(_L("New Project"));
|
||||||
|
@ -1222,6 +1228,8 @@ void MainFrame::set_mode(EMode mode)
|
||||||
m_restore_from_gcode_viewer.collapsed_sidebar = true;
|
m_restore_from_gcode_viewer.collapsed_sidebar = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_plater->Thaw();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue