ENH: enhance auto flush option

1.Support auto flush when change printer and nozzle volume type

jira:NONE

Signed-off-by: xun.zhang <xun.zhang@bambulab.com>
Change-Id: I9dfc2fff095bbf1901afe99556d1e57aa225f482
(cherry picked from commit f12305832227940eb0eae05817ad046dd4eff02d)
This commit is contained in:
xun.zhang
2025-02-17 21:21:10 +08:00
committed by Noisyfox
parent 27b16455b7
commit 0af34f4324
6 changed files with 158 additions and 130 deletions

View File

@@ -225,7 +225,13 @@ public:
void update_ui_from_settings();
bool show_object_list(bool show) const;
void finish_param_edit();
void auto_calc_flushing_volumes(const int modify_id);
/**
* @brief Automatically calculates flushing volumes
* @param filament_idx Specifies the filament index to calculate. -1 indicates all filament indices.
* @param extruder_id Specifies the extruder id to calculate. -1 indicates all extruders indices.
*/
void auto_calc_flushing_volumes(const int filament_idx = -1, const int extruder_id = -1);
void jump_to_object(ObjectDataViewModelNode* item);
void can_search();
#ifdef _MSW_DARK_MODE
@@ -242,6 +248,9 @@ public:
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:
void auto_calc_flushing_volumes_internal(const int filament_id, const int extruder_id);
private:
struct priv;
std::unique_ptr<priv> p;