mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-24 19:32:18 +00:00
ENH:add check machine sync status logic
1. Check machine sync logic before pop up filament map 2. Switch to auto for flush mode if is not synced jira: NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I05ef0e610418767f763c5579f5fc85a4e9b79c47 (cherry picked from commit 5d7f8b126789ca4f8f20d5cfbcc70ac24efd4d6c)
This commit is contained in:
@@ -3221,6 +3221,7 @@ struct Plater::priv
|
||||
void unbind_canvas_event_handlers();
|
||||
void reset_canvas_volumes();
|
||||
bool check_ams_status_impl(); // Check whether the printer and ams status are consistent, for grouping algorithm
|
||||
bool get_machine_sync_status(); // check whether the printer is linked and the printer type is same as selected profile
|
||||
|
||||
// BBS
|
||||
bool init_collapse_toolbar();
|
||||
@@ -8988,6 +8989,20 @@ bool Plater::priv::check_ams_status_impl()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Plater::priv::get_machine_sync_status()
|
||||
{
|
||||
Slic3r::DeviceManager *dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||
if (!dev)
|
||||
return false;
|
||||
|
||||
MachineObject* obj = dev->get_selected_machine();
|
||||
if (!obj)
|
||||
return false;
|
||||
|
||||
PresetBundle *preset_bundle = wxGetApp().preset_bundle;
|
||||
return preset_bundle && preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle) == obj->printer_type;
|
||||
}
|
||||
|
||||
bool Plater::priv::init_collapse_toolbar()
|
||||
{
|
||||
if (wxGetApp().is_gcode_viewer())
|
||||
@@ -15824,6 +15839,11 @@ void Plater::update_machine_sync_status()
|
||||
GUI::wxGetApp().sidebar().update_sync_status(obj);
|
||||
}
|
||||
|
||||
bool Plater::get_machine_sync_status()
|
||||
{
|
||||
return p->get_machine_sync_status();
|
||||
}
|
||||
|
||||
#if ENABLE_ENVIRONMENT_MAP
|
||||
void Plater::init_environment_texture()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user