From b5195d8cf6a8ed5c446284f904e5704748915450 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 28 Aug 2014 16:20:35 +0000 Subject: Don't show value menu items for control outputs. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5453 a436a847-0d15-0410-975c-d299462d15a1 --- src/gui/PortMenu.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index 7eeef5b1..70fb4f4e 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -65,6 +65,7 @@ PortMenu::init(App& app, SPtr port, bool is_graph_port) const bool is_control(app.can_control(port.get()) && port->is_numeric()); const bool is_on_graph(dynamic_ptr_cast(port->parent())); + const bool is_input(port->is_input()); if (!_is_graph_port) { _polyphonic_menuitem->set_sensitive(false); @@ -76,12 +77,12 @@ PortMenu::init(App& app, SPtr port, bool is_graph_port) _polyphonic_menuitem->hide(); } - _reset_range_menuitem->set_visible(is_control && !is_on_graph); - _set_max_menuitem->set_visible(is_control); - _set_min_menuitem->set_visible(is_control); + _reset_range_menuitem->set_visible(is_input && is_control && !is_on_graph); + _set_max_menuitem->set_visible(is_input && is_control); + _set_min_menuitem->set_visible(is_input && is_control); _expose_menuitem->set_visible(!is_on_graph); - _learn_menuitem->set_visible(is_control); - _unlearn_menuitem->set_visible(is_control); + _learn_menuitem->set_visible(is_input && is_control); + _unlearn_menuitem->set_visible(is_input && is_control); if (!is_control && is_on_graph) { _separator_menuitem->hide(); -- cgit v1.2.1