mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Removed unused members from View3D and unused parameters from Preview::Init()
This commit is contained in:
		
							parent
							
								
									77964de9f2
								
							
						
					
					
						commit
						973fafab2f
					
				
					 2 changed files with 4 additions and 14 deletions
				
			
		|  | @ -33,9 +33,6 @@ namespace GUI { | |||
| #if !ENABLE_IMGUI | ||||
|     , m_gizmo_widget(nullptr) | ||||
| #endif // !ENABLE_IMGUI
 | ||||
|     , m_model(nullptr) | ||||
|     , m_config(nullptr) | ||||
|     , m_process(nullptr) | ||||
| { | ||||
|     init(parent, bed, camera, view_toolbar, model, config, process); | ||||
| } | ||||
|  | @ -202,18 +199,15 @@ Preview::Preview(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_t | |||
|     , m_enabled(false) | ||||
|     , m_schedule_background_process(schedule_background_process_func) | ||||
| { | ||||
|     if (init(parent, bed, camera, view_toolbar, config, process, gcode_preview_data)) | ||||
|     if (init(parent, bed, camera, view_toolbar)) | ||||
|     { | ||||
|         show_hide_ui_elements("none"); | ||||
|         load_print(); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar, DynamicPrintConfig* config, BackgroundSlicingProcess* process, GCodePreviewData* gcode_preview_data) | ||||
| bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar) | ||||
| { | ||||
|     if ((config == nullptr) || (process == nullptr) || (gcode_preview_data == nullptr)) | ||||
|         return false; | ||||
| 
 | ||||
|     if (!Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 /* disable wxTAB_TRAVERSAL */)) | ||||
|         return false; | ||||
| 
 | ||||
|  | @ -222,7 +216,7 @@ bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view | |||
|     m_canvas = _3DScene::get_canvas(this->m_canvas_widget); | ||||
|     m_canvas->allow_multisample(GLCanvas3DManager::can_multisample()); | ||||
|     m_canvas->set_config(m_config); | ||||
|     m_canvas->set_process(process); | ||||
|     m_canvas->set_process(m_process); | ||||
|     m_canvas->enable_legend_texture(true); | ||||
|     m_canvas->enable_dynamic_background(true); | ||||
| 
 | ||||
|  |  | |||
|  | @ -39,10 +39,6 @@ class View3D : public wxPanel | |||
|     wxPanel* m_gizmo_widget; | ||||
| #endif // !ENABLE_IMGUI
 | ||||
| 
 | ||||
|     Model* m_model; | ||||
|     DynamicPrintConfig* m_config; | ||||
|     BackgroundSlicingProcess* m_process; | ||||
| 
 | ||||
| public: | ||||
|     View3D(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar, Model* model, DynamicPrintConfig* config, BackgroundSlicingProcess* process); | ||||
|     virtual ~View3D(); | ||||
|  | @ -124,7 +120,7 @@ public: | |||
|     void refresh_print(); | ||||
| 
 | ||||
| private: | ||||
|     bool init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar, DynamicPrintConfig* config, BackgroundSlicingProcess* process, GCodePreviewData* gcode_preview_data); | ||||
|     bool init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view_toolbar); | ||||
| 
 | ||||
|     void bind_event_handlers(); | ||||
|     void unbind_event_handlers(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Enrico Turri
						Enrico Turri