fix up various issues with sizing now that we have the basic idea that pixfaders...
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 17 Jan 2013 02:35:06 +0000 (02:35 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 17 Jan 2013 02:35:06 +0000 (02:35 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@13867 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/processor_box.cc
gtk2_ardour/processor_box.h

index 7bdac0c86d6b37875360cfb8eef512498b95a57d..b9e8102214ecfa9fd31c70cde3c6026ce741cdd3 100644 (file)
@@ -691,6 +691,8 @@ ProcessorBox::ProcessorBox (ARDOUR::Session* sess, boost::function<PluginSelecto
        , _placement (-1)
        , _visible_prefader_processors (0)
        , _rr_selection(rsel)
+       , _redisplay_pending (false)
+
 {
        set_session (sess);
 
@@ -843,7 +845,8 @@ ProcessorBox::set_width (Width w)
                (*i)->set_enum_width (w);
        }
 
-       redisplay_processors ();
+       _redisplay_pending = true;
+       
 }
 
 Gtk::Menu*
@@ -2501,9 +2504,14 @@ ProcessorBox::on_size_allocate (Allocation& a)
 {
        HBox::on_size_allocate (a);
 
-       list<ProcessorEntry*> children = processor_display.children ();
-       for (list<ProcessorEntry*>::const_iterator i = children.begin(); i != children.end(); ++i) {
-               (*i)->set_pixel_width (a.get_width ());
+       if (_redisplay_pending) {
+               _redisplay_pending = false;
+               redisplay_processors ();
+       } else {
+               list<ProcessorEntry*> children = processor_display.children ();
+               for (list<ProcessorEntry*>::const_iterator i = children.begin(); i != children.end(); ++i) {
+                       (*i)->set_pixel_width (a.get_width ());
+               }
        }
 }
 
index 268241a4e6602dc1b7b071b2356599d094868f75..f500a0683843b4e2f15d5b12c68974d4687cd1ef 100644 (file)
@@ -300,6 +300,7 @@ class ProcessorBox : public Gtk::HBox, public PluginInterestedObject, public ARD
        void object_drop (Gtkmm2ext::DnDVBox<ProcessorEntry> *, ProcessorEntry *, Glib::RefPtr<Gdk::DragContext> const &);
 
        Width _width;
+        bool  _redisplay_pending;
 
        Gtk::Menu *processor_menu;
        gint processor_menu_map_handler (GdkEventAny *ev);