Add extruder sync button

Co-authored-by: chunmao.guo <chunmao.guo@bambulab.com>
This commit is contained in:
Noisyfox
2026-05-21 09:04:26 +08:00
co-authored by chunmao.guo
parent 8f2ff7447e
commit e785f89833
7 changed files with 349 additions and 64 deletions
+12 -1
View File
@@ -327,19 +327,30 @@ private:
public:
struct SyncExtruderParams
{
DynamicConfig *config;
int from;
int to;
bool left_to_right;
NozzleVolumeType nozzle;
};
// show unsaved changes when preset is switching
UnsavedChangesDialog(Preset::Type type, PresetCollection* dependent_presets, const std::string& new_selected_preset, bool no_transfer = false);
// show unsaved changes for all another cases
UnsavedChangesDialog(const wxString& caption, const wxString& header, const std::string& app_config_key, int act_buttons);
UnsavedChangesDialog(const wxString &caption, const wxString &header, DynamicConfig *config, int from, int to, bool left_to_right, NozzleVolumeType nozzle);
~UnsavedChangesDialog() override = default;
int ShowModal();
void build(Preset::Type type, PresetCollection *dependent_presets, const std::string &new_selected_preset, const wxString &header = "");
void update(Preset::Type type, PresetCollection* dependent_presets, const std::string& new_selected_preset, const wxString& header);
void update_list();
void update_list(SyncExtruderParams *params = nullptr);
std::string subreplace(std::string resource_str, std::string sub_str, std::string new_str);
void update_tree(Preset::Type type, PresetCollection *presets);
void update_tree(Preset::Type type, DynamicConfig *config, int from, int to);
void show_info_line(Action action, std::string preset_name = "");
void update_config(Action action);
void close(Action action);