diff --git a/src/slic3r/GUI/Widgets/ComboBox.cpp b/src/slic3r/GUI/Widgets/ComboBox.cpp index 34519d203f..c331431b9d 100644 --- a/src/slic3r/GUI/Widgets/ComboBox.cpp +++ b/src/slic3r/GUI/Widgets/ComboBox.cpp @@ -85,10 +85,13 @@ void ComboBox::SetSelection(int n) return; drop.SetSelection(n); SetLabel(drop.GetValue()); - if (drop.selection >= 0 && drop.iconSize.y > 0) - SetIcon(icons[drop.selection].IsNull() ? create_scaled_bitmap("drop_down", nullptr, 16): icons[drop.selection]); // ORCA fix combo boxes without arrows + if (drop.selection >= 0 && drop.iconSize.y > 0 && icons[drop.selection].IsOk()) + SetIcon(icons[drop.selection]); + else + SetIcon("drop_down"); } -void ComboBox::SelectAndNotify(int n) { + +void ComboBox::SelectAndNotify(int n) { SetSelection(n); sendComboBoxEvent(); } @@ -108,8 +111,10 @@ void ComboBox::SetValue(const wxString &value) { drop.SetValue(value); SetLabel(value); - if (drop.selection >= 0 && drop.iconSize.y > 0) - SetIcon(icons[drop.selection].IsNull() ? create_scaled_bitmap("drop_down", nullptr, 16): icons[drop.selection]); // ORCA fix combo boxes without arrows + if (drop.selection >= 0 && drop.iconSize.y > 0 && icons[drop.selection].IsOk()) + SetIcon(icons[drop.selection]); + else + SetIcon("drop_down"); } void ComboBox::SetLabel(const wxString &value) diff --git a/src/slic3r/GUI/Widgets/DropDown.cpp b/src/slic3r/GUI/Widgets/DropDown.cpp index ab48a27d2d..092e073bb2 100644 --- a/src/slic3r/GUI/Widgets/DropDown.cpp +++ b/src/slic3r/GUI/Widgets/DropDown.cpp @@ -332,7 +332,8 @@ void DropDown::messureSize() wxSize size1 = text_off ? wxSize() : dc.GetMultiLineTextExtent(texts[i]); if (icons[i].IsOk()) { wxSize size2 = GetBmpSize(icons[i]); - if (size2.x > iconSize.x) iconSize = size2; + if (size2.x > iconSize.x) + iconSize = size2; if (!align_icon) { size1.x += size2.x + (text_off ? 0 : 5); }