FIX: Show RGB for custom color and allow staying in official picker dialog

- Display RGB values when a custom color is selected
- Prevent official color picker dialog from closing when custom color dialog is canceled
- Ensure multi-color materials are correctly displayed when importing new 3MF files

jira: STUDIO-12938, STUDIO-12937, STUDIO-12933, STUDIO-13110

Change-Id: Iab410585bf8cc5e9e81c6f0da23fe4ddba561785
(cherry picked from commit 2c20d591b998b02b0b66ac81b048a28fa26bd409)
This commit is contained in:
fei2.fang
2025-07-01 16:58:41 +08:00
committed by Noisyfox
parent 0bbd563a79
commit ea826815af
6 changed files with 82 additions and 14 deletions

View File

@@ -581,6 +581,19 @@ std::vector<std::vector<std::string>> read_color_pack(std::vector<std::string> c
return color_info;
}
wxColourData show_sys_picker_dialog(wxWindow *parent, const wxColourData &clr_data)
{
wxColourData data;
data.SetChooseFull(true);
data.SetColour(clr_data.GetColour());
wxColourDialog dialog(parent, &data);
dialog.SetTitle(_L("Please choose the filament colour"));
if (dialog.ShowModal() == wxID_OK) {
data = dialog.GetColourData();
}
return data;
}
wxBitmap *get_extruder_color_icon(std::vector<std::string> colors, bool is_gradient, std::string label, int icon_width, int icon_height){
static Slic3r::GUI::BitmapCache bmp_cache;
@@ -751,7 +764,6 @@ void apply_extruder_selector(Slic3r::GUI::BitmapComboBox** ctrl,
(*ctrl)->SetSelection(0);
}
// ----------------------------------------------------------------------------
// LockButton
// ----------------------------------------------------------------------------