Fixed undo/redo snapshot when opening a project using the recent files list
This commit is contained in:
parent
2c6e4b4e5b
commit
3fe355509c
1 changed files with 3 additions and 2 deletions
|
@ -3904,8 +3904,6 @@ void Plater::load_project()
|
||||||
// Ask user for a project file name.
|
// Ask user for a project file name.
|
||||||
wxString input_file;
|
wxString input_file;
|
||||||
wxGetApp().load_project(this, input_file);
|
wxGetApp().load_project(this, input_file);
|
||||||
// Take the Undo / Redo snapshot.
|
|
||||||
Plater::TakeSnapshot snapshot(this, _(L("Load Project")) + ": " + wxString::FromUTF8(into_path(input_file).stem().string().c_str()));
|
|
||||||
// And finally load the new project.
|
// And finally load the new project.
|
||||||
load_project(input_file);
|
load_project(input_file);
|
||||||
}
|
}
|
||||||
|
@ -3915,6 +3913,9 @@ void Plater::load_project(const wxString& filename)
|
||||||
if (filename.empty())
|
if (filename.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Take the Undo / Redo snapshot.
|
||||||
|
Plater::TakeSnapshot snapshot(this, _(L("Load Project")) + ": " + wxString::FromUTF8(into_path(filename).stem().string().c_str()));
|
||||||
|
|
||||||
p->reset();
|
p->reset();
|
||||||
p->set_project_filename(filename);
|
p->set_project_filename(filename);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue