Simplify code of PluginDisplay::update_height_alloc()
authorJohannes Mueller <github@johannes-mueller.org>
Tue, 15 Aug 2017 16:18:44 +0000 (18:18 +0200)
committerJohannes Mueller <github@johannes-mueller.org>
Tue, 15 Aug 2017 17:13:05 +0000 (19:13 +0200)
Partly irrelevant code. A more elaborated resize height allocation behavior
won't be needed before the widget layout in the generic GUI is improved.

gtk2_ardour/plugin_display.cc

index b04eb271b75fa8d83c7ddf435223abca047218d5..24d8658d42d50a11c7de636a55bf1520f2d5245a 100644 (file)
@@ -75,17 +75,9 @@ PluginDisplay::update_height_alloc (uint32_t height)
 {
        uint32_t shm = std::min (_max_height, height);
 
-       Gtk::Container* pr = get_parent();
-       for (uint32_t i = 0; i < 4 && pr; ++i) {
-               // VBox, EventBox, ViewPort, ScrolledWindow
-               pr = pr->get_parent();
-       }
-
        if (shm != _cur_height) {
-               if (_cur_height < shm) {
-                       queue_resize ();
-               }
                _cur_height = shm;
+               queue_resize ();
        }
 }