FIX: [STUDIO-1586] take new project snapshot after reset
Change-Id: Iad3be50d5c783d0114eaea8c0a5b03f45a45aa36
This commit is contained in:
parent
5276528e04
commit
c3398a089c
2 changed files with 21 additions and 3 deletions
|
@ -249,6 +249,15 @@ ParamsPanel::ParamsPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, c
|
|||
});
|
||||
}
|
||||
|
||||
//m_staticline_filament = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
////m_staticline_print = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
//m_staticline_print_object = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
//m_staticline_print_part = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
//m_staticline_printer = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
|
||||
// BBS: new layout
|
||||
//m_staticline_buttons = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL);
|
||||
//m_staticline_middle = new wxStaticLine(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL);
|
||||
|
||||
//m_export_to_file = new Button( this, wxT("Export To File"), "");
|
||||
//m_import_from_file = new Button( this, wxT("Import From File") );
|
||||
|
||||
|
@ -398,14 +407,20 @@ void ParamsPanel::create_layout()
|
|||
}
|
||||
|
||||
if (m_tab_print_object) {
|
||||
if (m_staticline_print_object)
|
||||
m_left_sizer->Add( m_staticline_print_object, 0, wxEXPAND );
|
||||
m_left_sizer->Add( m_tab_print_object, 0, wxEXPAND );
|
||||
}
|
||||
|
||||
if (m_tab_print_part) {
|
||||
if (m_staticline_print_part)
|
||||
m_left_sizer->Add( m_staticline_print_part, 0, wxEXPAND );
|
||||
m_left_sizer->Add( m_tab_print_part, 0, wxEXPAND );
|
||||
}
|
||||
|
||||
if (m_tab_filament) {
|
||||
if (m_staticline_filament)
|
||||
m_left_sizer->Add(m_staticline_filament, 0, wxEXPAND);
|
||||
//m_filament_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
//m_filament_sizer->Add( m_tab_filament, 1, wxEXPAND | wxALL, 5 );
|
||||
// m_left_sizer->Add( m_filament_sizer, 1, wxEXPAND, 5 );
|
||||
|
@ -413,6 +428,8 @@ void ParamsPanel::create_layout()
|
|||
}
|
||||
|
||||
if (m_tab_printer) {
|
||||
if (m_staticline_printer)
|
||||
m_left_sizer->Add( m_staticline_printer, 0, wxEXPAND );
|
||||
//m_printer_sizer = new wxBoxSizer( wxVERTICAL );
|
||||
//m_printer_sizer->Add( m_tab_printer, 1, wxEXPAND | wxALL, 5 );
|
||||
m_left_sizer->Add( m_tab_printer, 0, wxEXPAND );
|
||||
|
|
|
@ -7284,8 +7284,6 @@ int Plater::new_project(bool skip_confirm, bool silent)
|
|||
if (!silent)
|
||||
wxGetApp().mainframe->select_tab(MainFrame::tp3DEditor);
|
||||
|
||||
Plater::TakeSnapshot snapshot(this, "New Project", UndoRedo::SnapshotType::ProjectSeparator);
|
||||
|
||||
//get_partplate_list().reinit();
|
||||
//get_partplate_list().update_slice_context_to_current_plate(p->background_process);
|
||||
//p->preview->update_gcode_result(p->partplate_list.get_current_slice_result());
|
||||
|
@ -7299,6 +7297,8 @@ int Plater::new_project(bool skip_confirm, bool silent)
|
|||
//set project name
|
||||
p->set_project_name(_L("Untitled"));
|
||||
|
||||
Plater::TakeSnapshot snapshot(this, "New Project", UndoRedo::SnapshotType::ProjectSeparator);
|
||||
|
||||
Model m;
|
||||
model().load_from(m); // new id avoid same path name
|
||||
get_partplate_list().select_plate(0);
|
||||
|
@ -7360,9 +7360,10 @@ void Plater::load_project(wxString const& filename2,
|
|||
bool load_restore = strategy & LoadStrategy::Restore;
|
||||
|
||||
// Take the Undo / Redo snapshot.
|
||||
Plater::TakeSnapshot snapshot(this, "Load Project", UndoRedo::SnapshotType::ProjectSeparator);
|
||||
reset();
|
||||
|
||||
Plater::TakeSnapshot snapshot(this, "Load Project", UndoRedo::SnapshotType::ProjectSeparator);
|
||||
|
||||
std::vector<fs::path> input_paths;
|
||||
input_paths.push_back(path);
|
||||
if (strategy & LoadStrategy::Restore)
|
||||
|
|
Loading…
Reference in a new issue