mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
FIX:Switching printer requires that cleared status of synchronization button
jira: STUDIO-12413 Change-Id: I86ad8125cd2b0b4c870cedd3b9b54c20c91dd9af (cherry picked from commit b8d2657515ca616e4e8577ed26e6ccfc4d849587)
This commit is contained in:
@@ -1330,7 +1330,8 @@ bool Sidebar::priv::sync_extruder_list(bool &only_external_material)
|
|||||||
|
|
||||||
void Sidebar::priv::update_sync_status(const MachineObject *obj)
|
void Sidebar::priv::update_sync_status(const MachineObject *obj)
|
||||||
{
|
{
|
||||||
auto clear_all_sync_status = [this]() {
|
StateColor not_synced_colour(std::pair<wxColour, int>(wxColour("#00AE42"), StateColor::Normal));
|
||||||
|
auto clear_all_sync_status = [this, ¬_synced_colour]() {
|
||||||
panel_printer_preset->ShowBadge(false);
|
panel_printer_preset->ShowBadge(false);
|
||||||
panel_printer_bed->ShowBadge(false);
|
panel_printer_bed->ShowBadge(false);
|
||||||
left_extruder->ShowBadge(false);
|
left_extruder->ShowBadge(false);
|
||||||
@@ -1339,6 +1340,8 @@ void Sidebar::priv::update_sync_status(const MachineObject *obj)
|
|||||||
right_extruder->sync_ams(nullptr, {}, {});
|
right_extruder->sync_ams(nullptr, {}, {});
|
||||||
single_extruder->ShowBadge(false);
|
single_extruder->ShowBadge(false);
|
||||||
single_extruder->sync_ams(nullptr, {}, {});
|
single_extruder->sync_ams(nullptr, {}, {});
|
||||||
|
btn_sync_printer->SetBorderColor(not_synced_colour);
|
||||||
|
btn_sync_printer->SetIcon("printer_sync");
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!obj || !obj->is_info_ready()) {
|
if (!obj || !obj->is_info_ready()) {
|
||||||
@@ -1485,7 +1488,6 @@ void Sidebar::priv::update_sync_status(const MachineObject *obj)
|
|||||||
}
|
}
|
||||||
|
|
||||||
StateColor synced_colour(std::pair<wxColour, int>(wxColour("#CECECE"), StateColor::Normal));
|
StateColor synced_colour(std::pair<wxColour, int>(wxColour("#CECECE"), StateColor::Normal));
|
||||||
StateColor not_synced_colour(std::pair<wxColour, int>(wxColour("#00AE42"), StateColor::Normal));
|
|
||||||
bool all_extruder_synced = std::all_of(extruder_synced.begin(), extruder_synced.end(), [](bool value) { return value; });
|
bool all_extruder_synced = std::all_of(extruder_synced.begin(), extruder_synced.end(), [](bool value) { return value; });
|
||||||
if (printer_synced && all_extruder_synced) {
|
if (printer_synced && all_extruder_synced) {
|
||||||
btn_sync_printer->SetBorderColor(synced_colour);
|
btn_sync_printer->SetBorderColor(synced_colour);
|
||||||
|
|||||||
Reference in New Issue
Block a user