diff options
Diffstat (limited to 'src/gui/NodeMenu.cpp')
-rw-r--r-- | src/gui/NodeMenu.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index be5d645b..faa61b56 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -149,7 +149,7 @@ NodeMenu::on_menu_randomize() const NodeModel* const nm = (NodeModel*)_object.get(); for (NodeModel::Ports::const_iterator i = nm->ports().begin(); i != nm->ports().end(); ++i) { - if ((*i)->is_input() && (*i)->type().is_control()) { + if ((*i)->is_input() && App::instance().can_control(i->get())) { float min = 0.0f, max = 1.0f; nm->port_value_range(*i, min, max); const float val = ((rand() / (float)RAND_MAX) * (max - min) + min); @@ -209,7 +209,7 @@ NodeMenu::has_control_inputs() { const NodeModel* const nm = (NodeModel*)_object.get(); for (NodeModel::Ports::const_iterator i = nm->ports().begin(); i != nm->ports().end(); ++i) - if ((*i)->is_input() && (*i)->type().is_control()) + if ((*i)->is_input() && (*i)->is_numeric()) return true; return false; |