mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Starting a new Slicer instance from the menu
This commit is contained in:
		
							parent
							
								
									20da7a8175
								
							
						
					
					
						commit
						56431d26e5
					
				
					 1 changed files with 15 additions and 0 deletions
				
			
		|  | @ -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
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Slic3rPE
						Slic3rPE