1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 00:03:52 +02:00

Fix incidentals to Bug 1331, though not the bug itself...

... See comments #1 and #2 at
http://bugzilla.audacityteam.org/show_bug.cgi?id=1331

Don't make strange undo history if, e.g., R to record (or other keystroke
with undoable effects) interrupts a drag with undoable effects (like time
shift).  Ensure that by first simulating a mouse button up event to stop the
drag, before dispatching the keystroke.

Don't crash if certain other drags, that do not have undoable effects, such
as selection or vertical ruler drag -- are interrupted by a keystroke
command (Ctrl+C in particular could cause crash).  However, in these cases,
the drag is still allowed to continue.
This commit is contained in:
Paul Licameli
2016-05-21 23:19:09 -04:00
parent 079eb3e98e
commit 7e0de9a9bc
4 changed files with 70 additions and 3 deletions

View File

@@ -1167,7 +1167,7 @@ bool TrackList::MoveDown(Track * t)
return false;
}
bool TrackList::Contains(Track * t) const
bool TrackList::Contains(const Track * t) const
{
return std::find_if(begin(), end(),
[=](const value_type &track) { return t == track.get(); }