mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 20:51:12 -06:00 
			
		
		
		
	FIX: load_ams_list for initial select machine
Change-Id: I87ffa52ffb207b850156866f03bb54eb9852ee42
This commit is contained in:
		
							parent
							
								
									bbc211d983
								
							
						
					
					
						commit
						a48451df35
					
				
					 3 changed files with 6 additions and 1 deletions
				
			
		|  | @ -1770,7 +1770,8 @@ void GUI_App::init_networking_callbacks() | |||
|                     obj->is_ams_need_update = false; | ||||
|                     obj->parse_json(msg); | ||||
| 
 | ||||
|                     if (this->m_device_manager->get_selected_machine() == obj && obj->is_ams_need_update) { | ||||
|                     auto sel = this->m_device_manager->get_selected_machine(); | ||||
|                     if ((sel == obj || sel == nullptr) && obj->is_ams_need_update) { | ||||
|                         GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj->amsList); | ||||
|                     } | ||||
|                 } | ||||
|  |  | |||
|  | @ -478,6 +478,9 @@ bool MonitorPanel::Show(bool show) | |||
|             obj = dev->get_selected_machine(); | ||||
|             if (obj == nullptr) { | ||||
|                 dev->load_last_machine(); | ||||
|                 obj = dev->get_selected_machine(); | ||||
|                 if (obj)  | ||||
|                     GUI::wxGetApp().sidebar().load_ams_list(obj->dev_id, obj->amsList); | ||||
|             } else { | ||||
|                 obj->reset_update_time(); | ||||
|             } | ||||
|  |  | |||
|  | @ -1374,6 +1374,7 @@ void Sidebar::load_ams_list(std::string const &device, std::map<std::string, Ams | |||
|         } | ||||
|     } | ||||
|     p->ams_list_device = device; | ||||
|     BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": %1% items") % filament_ams_list.size(); | ||||
|     wxGetApp().preset_bundle->filament_ams_list = filament_ams_list; | ||||
|     for (auto c : p->combos_filament) | ||||
|         c->update(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 chunmao.guo
						chunmao.guo