[SCM] calf/master: Fix radio buttons used by all the dynamics-related plugins.
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:40:49 UTC 2013
The following commit has been merged in the master branch:
commit 022dbc37d9d4bf1af2f33a288844156bdc13d27f
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Sat Jan 7 11:14:12 2012 +0000
Fix radio buttons used by all the dynamics-related plugins.
diff --git a/src/gui_controls.cpp b/src/gui_controls.cpp
index c9e9c89..4405c06 100644
--- a/src/gui_controls.cpp
+++ b/src/gui_controls.cpp
@@ -533,7 +533,7 @@ GtkWidget *radio_param_control::create(plugin_gui *_gui, int _param_no)
gui = _gui;
param_no = _param_no;
require_attribute("value");
- int value = -1;
+ value = -1;
string value_name = attribs["value"];
const parameter_properties &props = get_props();
if (props.choices && (value_name < "0" || value_name > "9"))
@@ -579,7 +579,9 @@ void radio_param_control::set()
{
_GUARD_CHANGE_
const parameter_properties &props = get_props();
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value == ((int)gui->plugin->get_param_value(param_no) - (int)props.min));
+ float pv = gui->plugin->get_param_value(param_no);
+ if (fabs(value-pv) < 0.5)
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value == ((int)gui->plugin->get_param_value(param_no) - (int)props.min));
}
// spin button
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list