Disable midi model updates during trim drags. Speeds the drags up at the cost of not updating notes in real-time. Fixes #3162.
git-svn-id: svn://localhost/ardour2/branches/3.0@7315 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
89b686f937
commit
bf7023bc7f
@ -1699,10 +1699,9 @@ TrimDrag::start_grab (GdkEvent* event, Gdk::Cursor *)
|
||||
speed = tv->track()->speed();
|
||||
}
|
||||
|
||||
nframes64_t region_start = (nframes64_t) (_primary->region()->position() / speed);
|
||||
nframes64_t region_end = (nframes64_t) (_primary->region()->last_frame() / speed);
|
||||
nframes64_t region_length = (nframes64_t) (_primary->region()->length() / speed);
|
||||
|
||||
nframes64_t const region_start = (nframes64_t) (_primary->region()->position() / speed);
|
||||
nframes64_t const region_end = (nframes64_t) (_primary->region()->last_frame() / speed);
|
||||
nframes64_t const region_length = (nframes64_t) (_primary->region()->length() / speed);
|
||||
|
||||
nframes64_t const pf = adjusted_current_frame (event);
|
||||
|
||||
@ -1778,6 +1777,7 @@ TrimDrag::motion (GdkEvent* event, bool first_move)
|
||||
for (list<DraggingView>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
|
||||
RegionView* rv = i->view;
|
||||
rv->fake_set_opaque(false);
|
||||
rv->enable_display (false);
|
||||
rv->region()->clear_history ();
|
||||
rv->region()->suspend_property_changes ();
|
||||
|
||||
@ -1869,6 +1869,7 @@ TrimDrag::finished (GdkEvent* event, bool movement_occurred)
|
||||
|
||||
for (list<DraggingView>::const_iterator i = _views.begin(); i != _views.end(); ++i) {
|
||||
_editor->thaw_region_after_trim (*i->view);
|
||||
i->view->enable_display (true);
|
||||
i->view->fake_set_opaque (true);
|
||||
if (_have_transaction) {
|
||||
_editor->session()->add_command (new StatefulDiffCommand (i->view->region()));
|
||||
|
@ -2940,3 +2940,12 @@ MidiRegionView::color_handler ()
|
||||
|
||||
/* XXX probably more to do here */
|
||||
}
|
||||
|
||||
void
|
||||
MidiRegionView::enable_display (bool yn)
|
||||
{
|
||||
RegionView::enable_display (yn);
|
||||
if (yn) {
|
||||
redisplay_model ();
|
||||
}
|
||||
}
|
||||
|
@ -279,6 +279,8 @@ class MidiRegionView : public RegionView
|
||||
void show_list_editor ();
|
||||
|
||||
void selection_as_notelist (Notes& selected, bool allow_all_if_none_selected = false);
|
||||
|
||||
void enable_display (bool);
|
||||
|
||||
protected:
|
||||
/** Allows derived types to specify their visibility requirements
|
||||
|
@ -86,7 +86,7 @@ class RegionView : public TimeAxisViewItem
|
||||
virtual void entered () {}
|
||||
virtual void exited () {}
|
||||
|
||||
void enable_display(bool yn) { _enable_display = yn; }
|
||||
virtual void enable_display(bool yn) { _enable_display = yn; }
|
||||
virtual void update_coverage_frames (LayerDisplay);
|
||||
|
||||
static PBD::Signal1<void,RegionView*> RegionViewGoingAway;
|
||||
|
Loading…
Reference in New Issue
Block a user