diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-02-28 11:15:53 -0500 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:38 -0400 |
commit | 3daad049362bed97935d09c1bfebe085ce482f6c (patch) | |
tree | 657a556e4bc5f3c69d62b82a9b55f2377d11c17f /libs | |
parent | 51c833dff5db4dc5a33d2e3ee8e4ea21a9720acd (diff) |
don't force size allocation to recompute pixfader patterns unless size actually changes
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gtkmm2ext/pixfader.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/pixfader.cc b/libs/gtkmm2ext/pixfader.cc index 0c435889dc..64ee449646 100644 --- a/libs/gtkmm2ext/pixfader.cc +++ b/libs/gtkmm2ext/pixfader.cc @@ -356,6 +356,9 @@ PixFader::on_size_request (GtkRequisition* req) void PixFader::on_size_allocate (Gtk::Allocation& alloc) { + int old_girth = _girth; + int old_span = _span; + CairoWidget::on_size_allocate(alloc); if (_orien == VERT) { @@ -366,7 +369,7 @@ PixFader::on_size_allocate (Gtk::Allocation& alloc) _span = alloc.get_width (); } - if (is_realized()) { + if (is_realized() && ((old_girth != _girth) || (old_span != _span))) { /* recreate patterns in case we've changed size */ create_patterns (); } |