Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlic3rPE <slic3r@Slic3rPEs-MacBook-Pro.local>2020-08-26 15:56:26 +0300
committerSlic3rPE <slic3r@Slic3rPEs-MacBook-Pro.local>2020-08-26 15:56:26 +0300
commit56431d26e5b01d9f206ad52a7eff4de443ec8038 (patch)
tree4793417f790c7f00cd1201cea8a515e28cb8773e /src/slic3r
parent20da7a817599354132df4a1946f65a0c8cdeede8 (diff)
Starting a new Slicer instance from the menu
Diffstat (limited to 'src/slic3r')
-rw-r--r--src/slic3r/GUI/MainFrame.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp
index bbc1da534..122d9c610 100644
--- a/src/slic3r/GUI/MainFrame.cpp
+++ b/src/slic3r/GUI/MainFrame.cpp
@@ -8,9 +8,12 @@
#include <wx/progdlg.h>
#include <wx/tooltip.h>
//#include <wx/glcanvas.h>
+#include <wx/filename.h>
+#include <wx/stdpaths.h>
#include <wx/debug.h>
#include <boost/algorithm/string/predicate.hpp>
+#include <boost/process/spawn.hpp>
#include "libslic3r/Print.hpp"
#include "libslic3r/Polygon.hpp"
@@ -979,6 +982,18 @@ void MainFrame::init_menubar()
append_menu_item(windowMenu, wxID_ANY, _(L("Print &Host Upload Queue")) + "\tCtrl+J", _(L("Display the Print Host Upload Queue window")),
[this](wxCommandEvent&) { m_printhost_queue_dlg->Show(); }, "upload_queue", nullptr,
[this]() {return true; }, this);
+
+ windowMenu->AppendSeparator();
+ append_menu_item(windowMenu, wxID_ANY, _(L("Open new instance")) + "\tCtrl+I", _(L("Open a new PrusaSlicer instance")),
+ [this](wxCommandEvent&) {
+ wxString path = wxStandardPaths::Get().GetExecutablePath();
+#ifdef __APPLE__
+ boost::process::spawn((const char*)path.c_str());
+#else
+ wxExecute(wxStandardPaths::Get().GetExecutablePath(), wxEXEC_ASYNC | wxEXEC_HIDE_CONSOLE | wxEXEC_MAKE_GROUP_LEADER);
+#endif
+ }, "upload_queue", nullptr,
+ [this]() {return true; }, this);
}
// View menu