Fix Faderport8/16 support in the wake of FP2
[ardour.git] / gtk2_ardour / plugin_display.cc
index b04eb271b75fa8d83c7ddf435223abca047218d5..e00e8e9559a0fde4806e7674027a389fd13aa1ca 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 ();
        }
 }
 
@@ -153,7 +145,7 @@ PluginDisplay::on_expose_event (GdkEventExpose* ev)
 
        cairo_save (cr);
        cairo_set_operator (cr, CAIRO_OPERATOR_SOURCE);
-       display_frame(cr, width, height);
+       display_sample(cr, width, height);
        cairo_clip (cr);
        cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
 
@@ -176,7 +168,7 @@ PluginDisplay::on_expose_event (GdkEventExpose* ev)
        std::string name = get_name();
        Gtkmm2ext::Color fill_color = UIConfiguration::instance().color (string_compose ("%1: fill active", name), &failed);
 
-       display_frame(cr, width, height);
+       display_sample(cr, width, height);
        cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
        cairo_set_line_width(cr, 1.0);
        if (failed) {
@@ -191,7 +183,7 @@ PluginDisplay::on_expose_event (GdkEventExpose* ev)
 }
 
 void
-PluginDisplay::display_frame (cairo_t* cr, double w, double h)
+PluginDisplay::display_sample (cairo_t* cr, double w, double h)
 {
        cairo_rectangle (cr, 0.0, 0.0, w, h);
 }