mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-21 12:15:21 +00:00
FIX: Should not sync when machine types are inconsistent
jira: none Change-Id: If769fe0d19fb06c4a70e616416bf28f194ebcd45 (cherry picked from commit 8360bd24735073f5882ab014cd80a30d93238ebc)
This commit is contained in:
@@ -2025,9 +2025,22 @@ void Sidebar::sync_extruder_list()
|
|||||||
p->sync_extruder_list();
|
p->sync_extruder_list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Sidebar::should_sync_extruder_list(MachineObject *obj)
|
||||||
|
{
|
||||||
|
if (obj && obj->is_connected() && obj->is_multi_extruders() && wxGetApp().plater()->is_multi_extruder_ams_empty()) {
|
||||||
|
std::string machine_print_name = obj->printer_type;
|
||||||
|
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||||
|
std::string target_model_id = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle);
|
||||||
|
if (machine_print_name == target_model_id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void Sidebar::load_ams_list(std::string const &device, MachineObject* obj)
|
void Sidebar::load_ams_list(std::string const &device, MachineObject* obj)
|
||||||
{
|
{
|
||||||
if (obj && obj->is_connected() && obj->is_multi_extruders() && wxGetApp().plater()->is_multi_extruder_ams_empty())
|
if (should_sync_extruder_list(obj))
|
||||||
sync_extruder_list();
|
sync_extruder_list();
|
||||||
|
|
||||||
std::map<int, DynamicPrintConfig> filament_ams_list = build_filament_ams_list(obj);
|
std::map<int, DynamicPrintConfig> filament_ams_list = build_filament_ams_list(obj);
|
||||||
|
|||||||
@@ -163,6 +163,7 @@ public:
|
|||||||
std::map<int, DynamicPrintConfig> build_filament_ams_list(MachineObject* obj);
|
std::map<int, DynamicPrintConfig> build_filament_ams_list(MachineObject* obj);
|
||||||
void sync_ams_list();
|
void sync_ams_list();
|
||||||
void sync_extruder_list();
|
void sync_extruder_list();
|
||||||
|
bool should_sync_extruder_list(MachineObject* obj);
|
||||||
// Orca
|
// Orca
|
||||||
void show_SEMM_buttons(bool bshow);
|
void show_SEMM_buttons(bool bshow);
|
||||||
void update_dynamic_filament_list();
|
void update_dynamic_filament_list();
|
||||||
|
|||||||
Reference in New Issue
Block a user