diff --git a/src/slic3r/GUI/FilamentGroupPopup.cpp b/src/slic3r/GUI/FilamentGroupPopup.cpp index 1cd65efa5a..7d5f693f87 100644 --- a/src/slic3r/GUI/FilamentGroupPopup.cpp +++ b/src/slic3r/GUI/FilamentGroupPopup.cpp @@ -11,9 +11,10 @@ static const wxString AutoForFlushLabel = _L("Filament-Saving Mode"); static const wxString AutoForMatchLabel = _L("Convenient Mode"); static const wxString ManualLabel = _L("Manual Mode"); -static const wxString AutoForFlushDesp = _L("(Arrage after slicing)"); +static const wxString AutoForFlushDesp = _L("(Arrange after slicing)"); static const wxString AutoForMatchDesp = _L("(Arrange before slicing)"); static const wxString ManualDesp = ""; +static const wxString MachineSyncTip = _L("(Please sync printer)"); static const wxString AutoForFlushDetail = _L("Disregrad the filaments in AMS. Optimize filament usage " "by calculating the best allocation for the left and right " @@ -220,7 +221,19 @@ void FilamentGroupPopup::Init(bool connect_status) radio_btns[ButtonType::btForMatch]->Enable(connect_status); button_labels[ButtonType::btForMatch]->Enable(connect_status); + + if (connect_status) { + button_desps[ButtonType::btForMatch]->SetLabel(AutoForMatchDesp); + } + else { + button_desps[ButtonType::btForMatch]->SetLabel(MachineSyncTip); + } + m_mode = get_prefered_map_mode(); + if (m_mode == fmmAutoForMatch && !connect_status) { + set_prefered_map_mode(fmmAutoForFlush); + m_mode = fmmAutoForFlush; + } wxCheckBoxState check_state = get_pop_up_remind_flag() ? wxCheckBoxState::wxCHK_UNCHECKED : wxCheckBoxState::wxCHK_CHECKED; remind_checkbox->Set3StateValue(check_state); diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 0fb162ce0b..a7a0107453 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -1638,7 +1638,7 @@ wxBoxSizer* MainFrame::create_side_tools() pos.x -= (m_slice_option_btn->GetRect().width + m_filament_group_popup->GetRect().width * 0.6); m_filament_group_popup->SetPosition(pos); - m_filament_group_popup->tryPopup(m_plater->check_ams_status()); + m_filament_group_popup->tryPopup(m_plater->get_machine_sync_status()); }); m_slice_btn->Bind(wxEVT_LEAVE_WINDOW, [this](auto& event) { diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 0e17e2aa5e..66ab8b63dd 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -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() { diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 78e454209b..b842679f7e 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -648,6 +648,8 @@ public: void update_objects_position_when_select_preset(const std::function &select_prest); bool check_ams_status(); + // only check sync status and printer model id + bool get_machine_sync_status(); void update_machine_sync_status();