mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 07:56:24 -06:00
ENH:flush_option display only when multi-color
Change-Id: I510444818eda820f4f54ecbb0063142467cbf334
This commit is contained in:
parent
49b00bfcd2
commit
82f1bad002
1 changed files with 13 additions and 1 deletions
|
@ -732,10 +732,22 @@ void MenuFactory::append_menu_items_flush_options(wxMenu* menu)
|
||||||
if (item_id != wxNOT_FOUND)
|
if (item_id != wxNOT_FOUND)
|
||||||
menu->Destroy(item_id);
|
menu->Destroy(item_id);
|
||||||
|
|
||||||
|
bool show_flush_option_menu = false;
|
||||||
ObjectList* object_list = obj_list();
|
ObjectList* object_list = obj_list();
|
||||||
const Selection& selection = get_selection();
|
const Selection& selection = get_selection();
|
||||||
|
if (wxGetApp().plater()->get_partplate_list().get_curr_plate()->contains(selection.get_bounding_box())) {
|
||||||
|
auto plate_extruders = wxGetApp().plater()->get_partplate_list().get_curr_plate()->get_extruders();
|
||||||
|
for (auto extruder : plate_extruders) {
|
||||||
|
if (extruder != plate_extruders[0])
|
||||||
|
show_flush_option_menu = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!show_flush_option_menu)
|
||||||
|
return;
|
||||||
|
|
||||||
|
DynamicPrintConfig& global_config = wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
||||||
ModelConfig& select_object_config = object_list->object(selection.get_object_idx())->config;
|
ModelConfig& select_object_config = object_list->object(selection.get_object_idx())->config;
|
||||||
|
|
||||||
auto keys = select_object_config.keys();
|
auto keys = select_object_config.keys();
|
||||||
|
|
||||||
DynamicPrintConfig& global_config = wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
DynamicPrintConfig& global_config = wxGetApp().preset_bundle->prints.get_edited_preset().config;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue