View Issue Details

IDProjectCategoryView StatusLast Update
0004221ardourbugspublic2020-04-19 20:15
Reporterpneuman Assigned Tocth103  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Target Version3.0-beta1 
Summary0004221: Drop-down boxes in generated plugin GUIs don't function properly
DescriptionWhen opening the generated GUI for a plugin (either a LADSPA plugin, or an LV2 plugin without its own GUI), any drop-down box controls in the GUI fail to work as expected. Specifically, they default to an "empty" state (there is no text in the control when the GUI is first rendered), and while all the appropriate options are revealed when you click on it, selecting one of them doesn't seem to change the value of the parameter.

This is perhaps most clear with the Calf Filter LADSPA plugin -- it has a drop-down to select the filter type, but regardless of what is selected, it runs in its default low-pass mode.
Additional InformationArdour 3 SVN r9915
OS: Ubuntu 10.10 AMD64
TagsNo tags attached.

Activities

2011-08-05 04:47

 

defaultDropdown.patch (986 bytes)   
Index: gtk2_ardour/generic_pluginui.cc
===================================================================
--- gtk2_ardour/generic_pluginui.cc	(revision 9955)
+++ gtk2_ardour/generic_pluginui.cc	(working copy)
@@ -501,14 +501,22 @@
 			= plugin->get_scale_points(port_index);
 
 		if (points) {
+			float dflt=plugin->default_value (port_index);
+			const std::string defaultString=points->begin()->first;
+			
 			std::vector<std::string> labels;
 			for (ARDOUR::Plugin::ScalePoints::const_iterator i = points->begin();
 			     i != points->end(); ++i) {
 				labels.push_back(i->first);
+				
+				if(i->second==dflt) {
+					defaultString=i->first;
+				}
 			}
 
 			control_ui->combo = new Gtk::ComboBoxText();
 			set_popdown_strings(*control_ui->combo, labels);
+			control_ui->combo->set_active_text(defaultString);
 			control_ui->combo->signal_changed().connect(
 				sigc::bind (sigc::mem_fun(*this, &GenericPluginUI::control_combo_changed),
 				            control_ui));
defaultDropdown.patch (986 bytes)   

jeremybub

2011-08-06 19:08

reporter   ~0011263

Note: the defaultDropdown.patch I attached is the wrong one. It specifies defaultString as const when it shouldn't be.

I've looked at the code, and I believe the problem is that GenericPluginUI.combo_map is not assigned to the value retrieved by
    boost::shared_ptr<ARDOUR::Plugin::ScalePoints> points=plugin->get_scale_points(port_index);

So the check

"if (!cui->ignore_change && cui->combo_map) {"

in GenericPluginUI::control_combo_changed

always skips the if block, and thus when the combo box is changed, the event never gets handled.

I would write a patch to somehow assign the contents of plugin->get_scale_points(port_index) to GenericPluginUI.combo_map, but I'm not sure if I need to copy assign it, assign by reference, or assign by shared_ptr somehow.

cth103

2011-09-07 14:42

administrator   ~0011454

Should be fixed in SVN 10064. Thanks for the comments, jeremybub.

system

2020-04-19 20:15

developer   ~0022689

Issue has been closed automatically, by Trigger Close Plugin.
Feel free to re-open with additional information if you think the issue is not resolved.

Issue History

Date Modified Username Field Change
2011-07-23 03:19 pneuman New Issue
2011-07-24 20:15 cth103 cost => 0.00
2011-07-24 20:15 cth103 Target Version => 3.0-beta1
2011-08-05 04:47 jeremybub File Added: defaultDropdown.patch
2011-08-06 19:08 jeremybub Note Added: 0011263
2011-09-07 14:42 cth103 Note Added: 0011454
2011-09-07 14:42 cth103 Status new => resolved
2011-09-07 14:42 cth103 Resolution open => fixed
2011-09-07 14:42 cth103 Assigned To => cth103
2020-04-19 20:15 system Note Added: 0022689
2020-04-19 20:15 system Status resolved => closed