mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-14 20:49:28 -07: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:
parent
454002d65c
commit
b0329ac88d
2 changed files with 15 additions and 1 deletions
|
|
@ -2025,9 +2025,22 @@ void Sidebar::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)
|
||||
{
|
||||
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();
|
||||
|
||||
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);
|
||||
void sync_ams_list();
|
||||
void sync_extruder_list();
|
||||
bool should_sync_extruder_list(MachineObject* obj);
|
||||
// Orca
|
||||
void show_SEMM_buttons(bool bshow);
|
||||
void update_dynamic_filament_list();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue