View Issue Details

IDProjectCategoryView StatusLast Update
0005331ardourbugspublic2013-02-07 13:58
ReporterPeterN Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Summary0005331: An open/close cycle on an LV2 UI results in an increasing gap in the window.
DescriptionAn open/close cycle on an LV2 UI results in an increasing gap in the window caused by Ardour repacking the button widgets and box every time the window is opened.

The attached patch fixes this by removing the widgets when the window is closed.
TagsNo tags attached.

Activities

2013-02-07 13:56

 

lv2ui_fix1.diff (752 bytes)   
Index: gtk2_ardour/lv2_plugin_ui.cc
===================================================================
--- gtk2_ardour/lv2_plugin_ui.cc	(revision 14055)
+++ gtk2_ardour/lv2_plugin_ui.cc	(working copy)
@@ -332,6 +332,18 @@
 {
 	stop_updating (0);
 
+	if (_ardour_buttons_box) {
+		_ardour_buttons_box->remove (focus_button);
+		_ardour_buttons_box->remove (bypass_button);
+		_ardour_buttons_box->remove (delete_button);
+		_ardour_buttons_box->remove (save_button);
+		_ardour_buttons_box->remove (add_button);
+		_ardour_buttons_box->remove (_preset_combo);
+		_ardour_buttons_box->remove (_preset_modified);
+		remove (*_ardour_buttons_box);
+		_ardour_buttons_box = NULL;
+	}
+
 	if (_gui_widget) {
 		remove (*_gui_widget);
 		_gui_widget = NULL;
lv2ui_fix1.diff (752 bytes)   

2013-02-07 13:57

 

lv2ui_fix2.diff (1,833 bytes)   
Index: gtk2_ardour/lv2_plugin_ui.cc
===================================================================
--- gtk2_ardour/lv2_plugin_ui.cc	(revision 14055)
+++ gtk2_ardour/lv2_plugin_ui.cc	(working copy)
@@ -219,18 +219,20 @@
 		features[features_count - 1] = &_external_ui_feature;
 		features[features_count]     = NULL;
 	} else {
-		_ardour_buttons_box = manage (new Gtk::HBox);
-		_ardour_buttons_box->set_spacing (6);
-		_ardour_buttons_box->set_border_width (6);
-		_ardour_buttons_box->pack_end (focus_button, false, false);
-		_ardour_buttons_box->pack_end (bypass_button, false, false, 10);
-		_ardour_buttons_box->pack_end (delete_button, false, false);
-		_ardour_buttons_box->pack_end (save_button, false, false);
-		_ardour_buttons_box->pack_end (add_button, false, false);
-		_ardour_buttons_box->pack_end (_preset_combo, false, false);
-		_ardour_buttons_box->pack_end (_preset_modified, false, false);
-		_ardour_buttons_box->show_all();
-		pack_start(*_ardour_buttons_box, false, false);
+		if (!_ardour_buttons_box) {
+			_ardour_buttons_box = manage (new Gtk::HBox);
+			_ardour_buttons_box->set_spacing (6);
+			_ardour_buttons_box->set_border_width (6);
+			_ardour_buttons_box->pack_end (focus_button, false, false);
+			_ardour_buttons_box->pack_end (bypass_button, false, false, 10);
+			_ardour_buttons_box->pack_end (delete_button, false, false);
+			_ardour_buttons_box->pack_end (save_button, false, false);
+			_ardour_buttons_box->pack_end (add_button, false, false);
+			_ardour_buttons_box->pack_end (_preset_combo, false, false);
+			_ardour_buttons_box->pack_end (_preset_modified, false, false);
+			_ardour_buttons_box->show_all();
+			pack_start(*_ardour_buttons_box, false, false);
+		}
 
 		_gui_widget = Gtk::manage((container = new Gtk::Alignment()));
 		pack_start(*_gui_widget, true, true);
lv2ui_fix2.diff (1,833 bytes)   

PeterN

2013-02-07 13:58

reporter   ~0014643

Alternatively, the second patch fixes the issue by only packing the widgets on the first open.

Both patches fix the issue individually so don't need to be applied together.

Issue History

Date Modified Username Field Change
2013-02-07 13:56 PeterN New Issue
2013-02-07 13:56 PeterN File Added: lv2ui_fix1.diff
2013-02-07 13:57 PeterN File Added: lv2ui_fix2.diff
2013-02-07 13:58 PeterN Note Added: 0014643