diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-17 02:35:06 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-17 02:35:06 +0000 |
commit | a52fb399690224b22c33b88b2c4a3d4a1dd0a98a (patch) | |
tree | bf9ef088f419629277706483390c83ed170e6f50 /gtk2_ardour | |
parent | 15078e5a6d8fbea7708f6abd1b8ec035900927ff (diff) |
fix up various issues with sizing now that we have the basic idea that pixfaders can dynamically resize themselves (#5273)
git-svn-id: svn://localhost/ardour2/branches/3.0@13867 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/processor_box.cc | 16 | ||||
-rw-r--r-- | gtk2_ardour/processor_box.h | 1 |
2 files changed, 13 insertions, 4 deletions
diff --git a/gtk2_ardour/processor_box.cc b/gtk2_ardour/processor_box.cc index 7bdac0c86d..b9e8102214 100644 --- a/gtk2_ardour/processor_box.cc +++ b/gtk2_ardour/processor_box.cc @@ -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 ()); + } } } diff --git a/gtk2_ardour/processor_box.h b/gtk2_ardour/processor_box.h index 268241a4e6..f500a06838 100644 --- a/gtk2_ardour/processor_box.h +++ b/gtk2_ardour/processor_box.h @@ -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); |