FIX: auto sync extruder list after connect printer

when enter in prepare page
jira: none

Change-Id: I3dd0ac4fbc283d5c4b8e85d01724251cc1a7131e
(cherry picked from commit 34ed8441a16499f922e82b6c83f140eda58055a5)
This commit is contained in:
zhimin.zeng
2025-01-17 15:04:52 +08:00
committed by Noisyfox
parent 8267224756
commit 98f305f32c
4 changed files with 18 additions and 6 deletions

View File

@@ -171,7 +171,7 @@ public:
std::map<int, DynamicPrintConfig> build_filament_ams_list(MachineObject* obj);
void sync_ams_list(bool is_from_big_sync_btn = false);
bool sync_extruder_list();
bool auto_sync_extruder_list_on_connect_priner(const MachineObject* obj);
bool need_auto_sync_extruder_list_after_connect_priner(const MachineObject* obj);
void update_sync_status(const MachineObject* obj);
void get_big_btn_sync_pos_size(wxPoint &pt, wxSize &size);
void get_small_btn_sync_pos_size(wxPoint &pt, wxSize &size);
@@ -219,11 +219,16 @@ public:
Search::OptionsSearcher& get_searcher();
std::string& get_search_line();
void update_printer_thumbnail();
bool need_auto_sync_after_connect_printer() const { return m_need_auto_sync_after_connect_printer; }
void set_need_auto_sync_after_connect_printer(bool need_auto_sync) { m_need_auto_sync_after_connect_printer = need_auto_sync; }
private:
struct priv;
std::unique_ptr<priv> p;
wxBoxSizer* m_scrolled_sizer = nullptr;
bool m_need_auto_sync_after_connect_printer{false};
};
class Plater: public wxPanel