From 3fe355509ce2dd4d9e99cbc6b977bee6ceba4699 Mon Sep 17 00:00:00 2001 From: Enrico Turri Date: Tue, 23 Jul 2019 12:57:58 +0200 Subject: [PATCH] Fixed undo/redo snapshot when opening a project using the recent files list --- src/slic3r/GUI/Plater.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 9e818adfa..b98faaa3c 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3904,8 +3904,6 @@ void Plater::load_project() // Ask user for a project file name. wxString 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. load_project(input_file); } @@ -3915,6 +3913,9 @@ void Plater::load_project(const wxString& filename) if (filename.empty()) 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->set_project_filename(filename);