mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Fixed build when tech ENABLE_GCODE_VIEWER is disabled
This commit is contained in:
		
							parent
							
								
									0f85777a79
								
							
						
					
					
						commit
						ccd8e3644e
					
				
					 3 changed files with 11 additions and 7 deletions
				
			
		|  | @ -577,17 +577,17 @@ int CLI::run(int argc, char **argv) | |||
| // #ifdef USE_WX
 | ||||
| #if ENABLE_GCODE_VIEWER | ||||
|         GUI::GUI_App* gui = new GUI::GUI_App(start_as_gcodeviewer ? GUI::GUI_App::EAppMode::GCodeViewer : GUI::GUI_App::EAppMode::Editor); | ||||
|         if (gui->get_app_mode() != GUI::GUI_App::EAppMode::GCodeViewer) { // gcode viewer is currently not performing instance check
 | ||||
|             bool gui_single_instance_setting = gui->app_config->get("single_instance") == "1"; | ||||
|             if (Slic3r::instance_check(argc, argv, gui_single_instance_setting)) { | ||||
|                 //TODO: do we have delete gui and other stuff?
 | ||||
|                 return -1; | ||||
|             } | ||||
|         } | ||||
| #else | ||||
|         GUI::GUI_App *gui = new GUI::GUI_App(); | ||||
| #endif // ENABLE_GCODE_VIEWER
 | ||||
| 
 | ||||
|         if(gui->get_app_mode() != GUI::GUI_App::EAppMode::GCodeViewer){ // gcode viewer is currently not performing instance check
 | ||||
| 		    bool gui_single_instance_setting = gui->app_config->get("single_instance") == "1"; | ||||
| 		    if (Slic3r::instance_check(argc, argv, gui_single_instance_setting)) { | ||||
| 			    //TODO: do we have delete gui and other stuff?
 | ||||
| 			    return -1; | ||||
| 		    } | ||||
|         } | ||||
| //		gui->autosave = m_config.opt_string("autosave");
 | ||||
|         GUI::GUI_App::SetInstance(gui); | ||||
| #if ENABLE_GCODE_VIEWER | ||||
|  |  | |||
|  | @ -1578,8 +1578,10 @@ void GUI_App::add_config_menu(wxMenuBar *menu) | |||
|                 PreferencesDialog dlg(mainframe); | ||||
|                 dlg.ShowModal(); | ||||
|                 app_layout_changed = dlg.settings_layout_changed(); | ||||
| #if ENABLE_GCODE_VIEWER | ||||
|                 if (dlg.seq_top_layer_only_changed()) | ||||
|                     this->plater_->refresh_print(); | ||||
| #endif // ENABLE_GCODE_VIEWER
 | ||||
|             } | ||||
|             if (app_layout_changed) { | ||||
|                 // hide full main_sizer for mainFrame
 | ||||
|  |  | |||
|  | @ -541,7 +541,9 @@ void Preview::refresh_print() | |||
|         return; | ||||
| 
 | ||||
|     load_print(true); | ||||
| #if ENABLE_GCODE_VIEWER | ||||
|     m_moves_slider->set_lower_editable(get_app_config()->get("seq_top_layer_only") == "0"); | ||||
| #endif // ENABLE_GCODE_VIEWER
 | ||||
| } | ||||
| 
 | ||||
| void Preview::msw_rescale() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966