mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-20 07:11:12 -06:00 
			
		
		
		
	Removed the "Quick Slice" menu items from the main menu,
a little bit of code cleaning / refactoring.
This commit is contained in:
		
							parent
							
								
									edc306db45
								
							
						
					
					
						commit
						79986188a7
					
				
					 7 changed files with 8 additions and 37 deletions
				
			
		|  | @ -9,9 +9,6 @@ | |||
| #include "libslic3r/Model.hpp" | ||||
| #include "slic3r/GUI/GLCanvas3DManager.hpp" | ||||
| 
 | ||||
| class wxBitmap; | ||||
| class wxWindow; | ||||
| 
 | ||||
| namespace Slic3r { | ||||
| 
 | ||||
| class Print; | ||||
|  |  | |||
|  | @ -11,16 +11,9 @@ | |||
| #if __APPLE__ | ||||
| #import <IOKit/pwr_mgt/IOPMLib.h> | ||||
| #elif _WIN32 | ||||
| #define WIN32_LEAN_AND_MEAN | ||||
| #define NOMINMAX | ||||
| #include <Windows.h> | ||||
| // Undefine min/max macros incompatible with the standard library
 | ||||
| // For example, std::numeric_limits<std::streamsize>::max()
 | ||||
| // produces some weird errors
 | ||||
| #ifdef min | ||||
| #undef min | ||||
| #endif | ||||
| #ifdef max | ||||
| #undef max | ||||
| #endif | ||||
| #include "boost/nowide/convert.hpp" | ||||
| #endif | ||||
| 
 | ||||
|  |  | |||
|  | @ -123,8 +123,8 @@ bool GUI_App::OnInit() | |||
| 
 | ||||
|     // application frame
 | ||||
|     std::cerr << "Creating main frame..." << std::endl; | ||||
|     //     wxImage::FindHandlerType(wxBITMAP_TYPE_PNG) ||
 | ||||
|     wxImage::AddHandler(new wxPNGHandler()); | ||||
|     if (wxImage::FindHandler(wxBITMAP_TYPE_PNG) == nullptr) | ||||
|         wxImage::AddHandler(new wxPNGHandler()); | ||||
|     mainframe = new MainFrame(no_plater, false); | ||||
|     sidebar().obj_list()->init_objects(); // propagate model objects to object list
 | ||||
|     update_mode(); | ||||
|  |  | |||
|  | @ -262,6 +262,7 @@ void MainFrame::init_menubar() | |||
| 
 | ||||
|         fileMenu->AppendSeparator(); | ||||
| 
 | ||||
| #if 0 | ||||
|         m_menu_item_repeat = nullptr; | ||||
|         append_menu_item(fileMenu, wxID_ANY, _(L("Quick Slice…\tCtrl+U")), _(L("Slice a file into a G-code")), | ||||
|             [this](wxCommandEvent&) { | ||||
|  | @ -282,6 +283,7 @@ void MainFrame::init_menubar() | |||
|             }); }, "cog_go.png"); | ||||
|         m_menu_item_repeat->Enable(false); | ||||
|         fileMenu->AppendSeparator(); | ||||
| #endif | ||||
|         m_menu_item_reslice_now = append_menu_item(fileMenu, wxID_ANY, _(L("(Re)Slice Now\tCtrl+R")), _(L("Start new slicing process")), | ||||
|             [this](wxCommandEvent&) { reslice_now(); }, "shape_handles.png"); | ||||
|         fileMenu->AppendSeparator(); | ||||
|  |  | |||
|  | @ -12,18 +12,13 @@ | |||
| #include "Plater.hpp" | ||||
| #include "Event.hpp" | ||||
| 
 | ||||
| class wxMenuBar; | ||||
| class wxNotebook; | ||||
| class wxPanel; | ||||
| class wxMenu; | ||||
| class wxProgressDialog; | ||||
| 
 | ||||
| namespace Slic3r { | ||||
| 
 | ||||
| class ProgressStatusBar; | ||||
| 
 | ||||
| // #define _(s)    Slic3r::GUI::I18N::translate((s))
 | ||||
| 
 | ||||
| namespace GUI | ||||
| { | ||||
| class Tab; | ||||
|  |  | |||
|  | @ -2852,7 +2852,7 @@ void Plater::export_amf() | |||
|     wxString path = dialog->GetPath(); | ||||
|     auto path_cstr = path.c_str(); | ||||
| 
 | ||||
| 	DynamicPrintConfig cfg = wxGetApp().preset_bundle->full_config(); | ||||
| 	DynamicPrintConfig cfg = wxGetApp().preset_bundle->full_config_secure(); | ||||
| 	if (Slic3r::store_amf(path_cstr, &p->model, dialog->get_checkbox_value() ? &cfg : nullptr)) { | ||||
|         // Success
 | ||||
|         p->statusbar()->set_status_text(wxString::Format(_(L("AMF file exported to %s")), path)); | ||||
|  | @ -2881,7 +2881,7 @@ void Plater::export_3mf(const boost::filesystem::path& output_path) | |||
|     if (!path.Lower().EndsWith(".3mf")) | ||||
|         return; | ||||
| 
 | ||||
| 	DynamicPrintConfig cfg = wxGetApp().preset_bundle->full_config(); | ||||
| 	DynamicPrintConfig cfg = wxGetApp().preset_bundle->full_config_secure(); | ||||
|     if (Slic3r::store_3mf(path.c_str(), &p->model, export_config ? &cfg : nullptr)) { | ||||
|         // Success
 | ||||
|         p->statusbar()->set_status_text(wxString::Format(_(L("3MF file exported to %s")), path)); | ||||
|  |  | |||
|  | @ -1,16 +0,0 @@ | |||
| #ifndef WIDGET_HPP | ||||
| #define WIDGET_HPP | ||||
| #include <wx/wxprec.h> | ||||
| #ifndef WX_PRECOM | ||||
| #include <wx/wx.h> | ||||
| #endif | ||||
| 
 | ||||
| class Widget { | ||||
| protected: | ||||
|     wxSizer* _sizer; | ||||
| public: | ||||
|     Widget(): _sizer(nullptr) { } | ||||
|     bool valid() const { return _sizer != nullptr; }  | ||||
|     wxSizer* sizer() const { return _sizer; }  | ||||
| }; | ||||
| #endif | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bubnikv
						bubnikv