avoid delivering NaN's when setting up a generic plugin UI
git-svn-id: svn://localhost/ardour2/branches/3.0@8116 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
785478b251
commit
422309880c
@ -527,7 +527,12 @@ GenericPluginUI::build_control_ui (guint32 port_index, boost::shared_ptr<Automat
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (control_ui->logarithmic) {
|
if (control_ui->logarithmic) {
|
||||||
adj->set_value(log(plugin->get_parameter(port_index)));
|
double val = plugin->get_parameter (port_index);
|
||||||
|
if (isnan (val) || val <= 0.0) {
|
||||||
|
adj->set_value (0.0);
|
||||||
|
} else {
|
||||||
|
adj->set_value (log(val));
|
||||||
|
}
|
||||||
} else{
|
} else{
|
||||||
adj->set_value(plugin->get_parameter(port_index));
|
adj->set_value(plugin->get_parameter(port_index));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user