mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	FIX: fix crash when select a printer in lan mode
Change-Id: I93f604c900a56e938b16bd377031c331ecc20f43 Signed-off-by: Stone Li <stone.li@bambulab.com>
This commit is contained in:
		
							parent
							
								
									89c83fb8a6
								
							
						
					
					
						commit
						7184960dce
					
				
					 1 changed files with 16 additions and 11 deletions
				
			
		|  | @ -549,11 +549,13 @@ void SelectMachinePopup::update_other_devices() | |||
|         } | ||||
| 
 | ||||
|         op->Bind(EVT_CONNECT_LAN_PRINT, [this, mobj](wxCommandEvent &e) { | ||||
|             if (mobj->is_lan_mode_printer()) { | ||||
|                 ConnectPrinterDialog dlg(wxGetApp().mainframe, wxID_ANY, _L("Input access code")); | ||||
|                 dlg.set_machine_object(mobj); | ||||
|                 if (dlg.ShowModal() == wxID_OK) { | ||||
|                     wxGetApp().mainframe->jump_to_monitor(mobj->dev_id); | ||||
|             if (mobj) { | ||||
|                 if (mobj->is_lan_mode_printer()) { | ||||
|                     ConnectPrinterDialog dlg(wxGetApp().mainframe, wxID_ANY, _L("Input access code")); | ||||
|                     dlg.set_machine_object(mobj); | ||||
|                     if (dlg.ShowModal() == wxID_OK) { | ||||
|                         wxGetApp().mainframe->jump_to_monitor(mobj->dev_id); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         }); | ||||
|  | @ -638,7 +640,8 @@ void SelectMachinePopup::update_user_devices() | |||
|             } | ||||
|             op->Bind(EVT_UNBIND_MACHINE, [this, dev, mobj](wxCommandEvent& e) { | ||||
|                 dev->set_selected_machine(""); | ||||
|                 mobj->set_access_code(""); | ||||
|                 if (mobj) | ||||
|                     mobj->set_access_code(""); | ||||
|                 MessageDialog msg_wingow(nullptr, _L("Log out successful."), "", wxAPPLY | wxOK); | ||||
|                 if (msg_wingow.ShowModal() == wxOK) { return; } | ||||
|                 }); | ||||
|  | @ -673,11 +676,13 @@ void SelectMachinePopup::update_user_devices() | |||
|         } | ||||
| 
 | ||||
|         op->Bind(EVT_CONNECT_LAN_PRINT, [this, mobj](wxCommandEvent &e) { | ||||
|             if (mobj->is_lan_mode_printer()) { | ||||
|                 ConnectPrinterDialog dlg(wxGetApp().mainframe, wxID_ANY, _L("Input access code")); | ||||
|                 dlg.set_machine_object(mobj); | ||||
|                 if (dlg.ShowModal() == wxID_OK) { | ||||
|                     wxGetApp().mainframe->jump_to_monitor(mobj->dev_id); | ||||
|             if (mobj) { | ||||
|                 if (mobj->is_lan_mode_printer()) { | ||||
|                     ConnectPrinterDialog dlg(wxGetApp().mainframe, wxID_ANY, _L("Input access code")); | ||||
|                     dlg.set_machine_object(mobj); | ||||
|                     if (dlg.ShowModal() == wxID_OK) { | ||||
|                         wxGetApp().mainframe->jump_to_monitor(mobj->dev_id); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|         }); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Stone Li
						Stone Li