From 64a2199733d2c6a0861973bcc9de7528039d2e07 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Thu, 17 Oct 2024 18:34:31 +0800 Subject: [PATCH] FIX: Add a matching rule with the same name for PA value jira: 8339 Change-Id: I134139fd8cff9cb47b29523e90d5dd4f2667c387 (cherry picked from commit 489285c9b89bdd21812c5e7429263fb28fd30f20) --- src/slic3r/GUI/AMSMaterialsSetting.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/slic3r/GUI/AMSMaterialsSetting.cpp b/src/slic3r/GUI/AMSMaterialsSetting.cpp index b96bdeb296..decb0ab042 100644 --- a/src/slic3r/GUI/AMSMaterialsSetting.cpp +++ b/src/slic3r/GUI/AMSMaterialsSetting.cpp @@ -993,6 +993,9 @@ void AMSMaterialsSetting::Popup(wxString filament, wxString sn, wxString temp_mi m_comboBox_filament->SetValue(wxEmptyString); } + // Set the flag whether to open the filament setting dialog from the device page + m_comboBox_filament->SetClientData(new int(1)); + update(); Layout(); Fit(); @@ -1026,6 +1029,9 @@ void AMSMaterialsSetting::on_select_cali_result(wxCommandEvent &evt) void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt) { + // Get the flag whether to open the filament setting dialog from the device page + int* from_printer = static_cast(m_comboBox_filament->GetClientData()); + m_filament_type = ""; PresetBundle* preset_bundle = wxGetApp().preset_bundle; if (preset_bundle) { @@ -1108,6 +1114,7 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt) m_comboBox_cali_result->SetValue(wxEmptyString); m_input_k_val->GetTextCtrl()->SetValue(wxEmptyString); m_input_n_val->GetTextCtrl()->SetValue(wxEmptyString); + m_comboBox_filament->SetClientData(new int(0)); return; } else { @@ -1231,6 +1238,8 @@ void AMSMaterialsSetting::on_select_filament(wxCommandEvent &evt) m_input_k_val->Disable(); } } + + m_comboBox_filament->SetClientData(new int(0)); } void AMSMaterialsSetting::on_dpi_changed(const wxRect &suggested_rect)