mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
Fix: forbid the filament setting to negative/enforcer/blocker
Change-Id: I846ad591c9967af1df3e47c1d007958cf0846766
This commit is contained in:
@@ -1342,6 +1342,12 @@ void MenuFactory::append_menu_item_change_filament(wxMenu* menu)
|
||||
if (sels.IsEmpty())
|
||||
return;
|
||||
|
||||
if (sels.Count() == 1) {
|
||||
const auto sel_vol = obj_list()->get_selected_model_volume();
|
||||
if (sel_vol && sel_vol->type() != ModelVolumeType::MODEL_PART && sel_vol->type() != ModelVolumeType::PARAMETER_MODIFIER)
|
||||
return;
|
||||
}
|
||||
|
||||
std::vector<wxBitmap*> icons = get_extruder_color_icons(true);
|
||||
if (icons.size() < filaments_cnt) {
|
||||
BOOST_LOG_TRIVIAL(warning) << boost::format("Warning: icons size %1%, filaments_cnt=%2%")%icons.size()%filaments_cnt;
|
||||
|
||||
Reference in New Issue
Block a user