mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	FIX: [STUDIO-3046] prevent wxGuiLog on app quit
Change-Id: I1a973a5e42eb286935317fdd8b6d08fb90a2f429
This commit is contained in:
		
							parent
							
								
									4c020fe102
								
							
						
					
					
						commit
						ec94c46665
					
				
					 2 changed files with 9 additions and 3 deletions
				
			
		|  | @ -2253,10 +2253,17 @@ bool GUI_App::OnInit() | |||
| 
 | ||||
| class wxBoostLog : public wxLog | ||||
| { | ||||
|     void DoLogText(const wxString &msg) { | ||||
|     void DoLogText(const wxString &msg) override { | ||||
|          | ||||
|         BOOST_LOG_TRIVIAL(warning) << msg.ToUTF8().data(); | ||||
|     } | ||||
|     ~wxBoostLog() override | ||||
|     { | ||||
|         // This is a hack. Prevent thread logs from going to wxGuiLog on app quit.
 | ||||
|         auto t = wxLog::SetActiveTarget(this); | ||||
|         wxLog::FlushActive(); | ||||
|         wxLog::SetActiveTarget(t); | ||||
|     } | ||||
| }; | ||||
| 
 | ||||
| bool GUI_App::on_init_inner() | ||||
|  |  | |||
|  | @ -475,10 +475,9 @@ void DropDown::mouseWheelMoved(wxMouseEvent &event) | |||
| // currently unused events
 | ||||
| void DropDown::sendDropDownEvent() | ||||
| { | ||||
|     selection = hover_item; | ||||
|     wxCommandEvent event(wxEVT_COMBOBOX, GetId()); | ||||
|     event.SetEventObject(this); | ||||
|     event.SetInt(selection); | ||||
|     event.SetInt(hover_item); | ||||
|     event.SetString(GetValue()); | ||||
|     GetEventHandler()->ProcessEvent(event); | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 chunmao.guo
						chunmao.guo