mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	call correct load_files at MacOpenFiles
This commit is contained in:
		
							parent
							
								
									ca09bf0805
								
							
						
					
					
						commit
						a650801b80
					
				
					 2 changed files with 12 additions and 3 deletions
				
			
		|  | @ -1771,8 +1771,17 @@ void GUI_App::MacOpenFiles(const wxArrayString &fileNames) | ||||||
|         if (!non_gcode_files.empty())  |         if (!non_gcode_files.empty())  | ||||||
|             start_new_slicer(non_gcode_files, true); |             start_new_slicer(non_gcode_files, true); | ||||||
|     } else { |     } else { | ||||||
|         if (! files.empty()) |         if (! files.empty()) { | ||||||
|  | #if ENABLE_DRAG_AND_DROP_FIX | ||||||
|  |             wxArrayString input_files; | ||||||
|  |             for (size_t i = 0; i < non_gcode_files.size(); ++i) { | ||||||
|  |                 input_files.push_back(non_gcode_files[i]); | ||||||
|  |             } | ||||||
|  |             this->plater()->load_files(input_files); | ||||||
|  | #else | ||||||
|             this->plater()->load_files(files, true, true); |             this->plater()->load_files(files, true, true); | ||||||
|  | #endif      | ||||||
|  |         } | ||||||
|         for (const wxString &filename : gcode_files) |         for (const wxString &filename : gcode_files) | ||||||
|             start_new_gcodeviewer(&filename); |             start_new_gcodeviewer(&filename); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -2132,7 +2132,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) | ||||||
| 
 | 
 | ||||||
| #if ENABLE_DRAG_AND_DROP_FIX | #if ENABLE_DRAG_AND_DROP_FIX | ||||||
|     this->q->Bind(EVT_LOAD_MODEL_OTHER_INSTANCE, [this](LoadFromOtherInstanceEvent& evt) { |     this->q->Bind(EVT_LOAD_MODEL_OTHER_INSTANCE, [this](LoadFromOtherInstanceEvent& evt) { | ||||||
|         BOOST_LOG_TRIVIAL(debug) << "received load from other instance event "; |         BOOST_LOG_TRIVIAL(error) << "received load from other instance event (1)"; | ||||||
|         wxArrayString input_files; |         wxArrayString input_files; | ||||||
|         for (size_t i = 0; i < evt.data.size(); ++i) { |         for (size_t i = 0; i < evt.data.size(); ++i) { | ||||||
|             input_files.push_back(from_u8(evt.data[i].string())); |             input_files.push_back(from_u8(evt.data[i].string())); | ||||||
|  | @ -2142,7 +2142,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) | ||||||
|     }); |     }); | ||||||
| #else | #else | ||||||
|     this->q->Bind(EVT_LOAD_MODEL_OTHER_INSTANCE, [this](LoadFromOtherInstanceEvent &evt) { |     this->q->Bind(EVT_LOAD_MODEL_OTHER_INSTANCE, [this](LoadFromOtherInstanceEvent &evt) { | ||||||
| 		BOOST_LOG_TRIVIAL(debug) << "received load from other instance event "; | 		BOOST_LOG_TRIVIAL(error) << "received load from other instance event (2)"; | ||||||
|         this->load_files(evt.data, true, true); |         this->load_files(evt.data, true, true); | ||||||
|     }); |     }); | ||||||
| #endif // ENABLE_DRAG_AND_DROP_FIX
 | #endif // ENABLE_DRAG_AND_DROP_FIX
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 David Kocik
						David Kocik