Show/Hide template filament profiles from "cog" context menu on sidebar.
This commit is contained in:
parent
45ba32d29a
commit
b8e1cfb2af
@ -644,13 +644,7 @@ PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset
|
|||||||
|
|
||||||
edit_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent)
|
edit_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent)
|
||||||
{
|
{
|
||||||
// In a case of a physical printer, for its editing open PhysicalPrinterDialog
|
if (m_type == Preset::TYPE_PRINTER || m_type == Preset::TYPE_FILAMENT)
|
||||||
if (m_type == Preset::TYPE_PRINTER
|
|
||||||
#ifdef __linux__
|
|
||||||
// To edit extruder color from the sidebar
|
|
||||||
|| m_type == Preset::TYPE_FILAMENT
|
|
||||||
#endif //__linux__
|
|
||||||
)
|
|
||||||
show_edit_menu();
|
show_edit_menu();
|
||||||
else
|
else
|
||||||
switch_to_tab();
|
switch_to_tab();
|
||||||
@ -784,15 +778,18 @@ void PlaterPresetComboBox::show_edit_menu()
|
|||||||
append_menu_item(menu, wxID_ANY, _L("Edit preset"), "",
|
append_menu_item(menu, wxID_ANY, _L("Edit preset"), "",
|
||||||
[this](wxCommandEvent&) { this->switch_to_tab(); }, "cog", menu, []() { return true; }, wxGetApp().plater());
|
[this](wxCommandEvent&) { this->switch_to_tab(); }, "cog", menu, []() { return true; }, wxGetApp().plater());
|
||||||
|
|
||||||
#ifdef __linux__
|
|
||||||
// To edit extruder color from the sidebar
|
|
||||||
if (m_type == Preset::TYPE_FILAMENT) {
|
if (m_type == Preset::TYPE_FILAMENT) {
|
||||||
|
#ifdef __linux__
|
||||||
|
// To edit extruder color from the sidebar
|
||||||
append_menu_item(menu, wxID_ANY, _L("Change extruder color"), "",
|
append_menu_item(menu, wxID_ANY, _L("Change extruder color"), "",
|
||||||
[this](wxCommandEvent&) { this->change_extruder_color(); }, "funnel", menu, []() { return true; }, wxGetApp().plater());
|
[this](wxCommandEvent&) { this->change_extruder_color(); }, "funnel", menu, []() { return true; }, wxGetApp().plater());
|
||||||
|
#endif //__linux__
|
||||||
|
append_menu_item(menu, wxID_ANY, _L("Show/Hide template presets"), "",
|
||||||
|
[this](wxCommandEvent&) { wxGetApp().open_preferences("no_templates", "General"); }, "spool", menu, []() { return true; }, wxGetApp().plater());
|
||||||
|
|
||||||
wxGetApp().plater()->PopupMenu(menu);
|
wxGetApp().plater()->PopupMenu(menu);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif //__linux__
|
|
||||||
|
|
||||||
if (this->is_selected_physical_printer()) {
|
if (this->is_selected_physical_printer()) {
|
||||||
append_menu_item(menu, wxID_ANY, _L("Edit physical printer"), "",
|
append_menu_item(menu, wxID_ANY, _L("Edit physical printer"), "",
|
||||||
|
Loading…
Reference in New Issue
Block a user