hide patch changes if they are too wide for the region at a given zoom level
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 12 Jun 2012 17:55:05 +0000 (17:55 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 12 Jun 2012 17:55:05 +0000 (17:55 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@12677 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/midi_region_view.cc

index 94a07e4fdd34fd7c1a5477fe056a83de7d6cb36f..5d8bca9d776aeedec877445318fb91482ad3de81 100644 (file)
@@ -1347,6 +1347,14 @@ MidiRegionView::reset_width_dependent_items (double pixel_width)
                redisplay_model();
        }
 
+       for (PatchChanges::iterator x = _patch_changes.begin(); x != _patch_changes.end(); ++x) {
+               if ((*x)->width() >= _pixel_width) {
+                       (*x)->hide();
+               } else {
+                       (*x)->show();
+               }
+       }
+
        move_step_edit_cursor (_step_edit_cursor_position);
        set_step_edit_cursor_width (_step_edit_cursor_width);
 }