From 66497cdb1f16f72b2538492f79d3929873c4cb7e Mon Sep 17 00:00:00 2001 From: YuSanka Date: Tue, 30 Jul 2019 15:45:32 +0200 Subject: [PATCH] Fixed SPE-993 + Added new icons for layers editing --- resources/icons/edit_layers_all.svg | 41 +++++++++++++++++ resources/icons/edit_layers_some.svg | 69 ++++++++++++++++++++++++++++ src/slic3r/GUI/GUI_ObjectList.cpp | 2 +- src/slic3r/GUI/Tab.cpp | 3 ++ src/slic3r/GUI/wxExtensions.cpp | 4 +- 5 files changed, 116 insertions(+), 3 deletions(-) create mode 100644 resources/icons/edit_layers_all.svg create mode 100644 resources/icons/edit_layers_some.svg diff --git a/resources/icons/edit_layers_all.svg b/resources/icons/edit_layers_all.svg new file mode 100644 index 000000000..4fccc1388 --- /dev/null +++ b/resources/icons/edit_layers_all.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/icons/edit_layers_some.svg b/resources/icons/edit_layers_some.svg new file mode 100644 index 000000000..7db56b3f0 --- /dev/null +++ b/resources/icons/edit_layers_some.svg @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/slic3r/GUI/GUI_ObjectList.cpp b/src/slic3r/GUI/GUI_ObjectList.cpp index 8ae1585b3..a7d4ab16d 100644 --- a/src/slic3r/GUI/GUI_ObjectList.cpp +++ b/src/slic3r/GUI/GUI_ObjectList.cpp @@ -1293,7 +1293,7 @@ wxMenuItem* ObjectList::append_menu_item_split(wxMenu* menu) wxMenuItem* ObjectList::append_menu_item_layers_editing(wxMenu* menu) { return append_menu_item(menu, wxID_ANY, _(L("Edit Layers")), "", - [this](wxCommandEvent&) { layers_editing(); }, "layers", menu); + [this](wxCommandEvent&) { layers_editing(); }, "edit_layers_all", menu); } wxMenuItem* ObjectList::append_menu_item_settings(wxMenu* menu_) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 31a2ce614..26bd1116b 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2186,6 +2186,9 @@ void TabPrinter::extruders_count_changed(size_t extruders_count) m_preset_bundle->update_multi_material_filament_presets(); is_count_changed = true; } + else if (m_extruders_count == 1 && + m_preset_bundle->project_config.option("wiping_volumes_matrix")->values.size()>1) + m_preset_bundle->update_multi_material_filament_presets(); /* This function should be call in any case because of correct updating/rebuilding * of unregular pages of a Printer Settings diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp index e5e429a02..9f36eceb9 100644 --- a/src/slic3r/GUI/wxExtensions.cpp +++ b/src/slic3r/GUI/wxExtensions.cpp @@ -450,7 +450,7 @@ ObjectDataViewModelNode::ObjectDataViewModelNode(ObjectDataViewModelNode* parent } else if (type == itLayerRoot) { - m_bmp = create_scaled_bitmap(nullptr, "layers"); // FIXME: pass window ptr + m_bmp = create_scaled_bitmap(nullptr, "edit_layers_all"); // FIXME: pass window ptr m_name = _(L("Layers")); } @@ -484,7 +484,7 @@ ObjectDataViewModelNode::ObjectDataViewModelNode(ObjectDataViewModelNode* parent } const std::string label_range = (boost::format(" %.2f-%.2f ") % layer_range.first % layer_range.second).str(); m_name = _(L("Range")) + label_range + "(" + _(L("mm")) + ")"; - m_bmp = create_scaled_bitmap(nullptr, "layers_white"); // FIXME: pass window ptr + m_bmp = create_scaled_bitmap(nullptr, "edit_layers_some"); // FIXME: pass window ptr #ifdef __WXGTK__ // it's necessary on GTK because of control have to know if this item will be container