mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 16:49:41 +02:00
commit fix for crash if you undo whilst time-shifting a track, found and produced by Campbell Barton
This commit is contained in:
parent
226be2f9c3
commit
c32cfbc2a5
@ -3521,6 +3521,11 @@ void AudacityProject::OnUndo()
|
||||
return;
|
||||
}
|
||||
|
||||
// can't undo while dragging
|
||||
if (mTrackPanel->IsMouseCaptured()) {
|
||||
return;
|
||||
}
|
||||
|
||||
TrackList *l = mUndoManager.Undo(&mViewInfo.sel0, &mViewInfo.sel1);
|
||||
PopState(l);
|
||||
|
||||
|
@ -3185,6 +3185,13 @@ bool TrackPanel::IsDragZooming()
|
||||
return (abs(mZoomEnd - mZoomStart) > DragThreshold);
|
||||
}
|
||||
|
||||
/// Determines if drag zooming is active
|
||||
bool TrackPanel::IsMouseCaptured()
|
||||
{
|
||||
return (mMouseCapture != IsUncaptured);
|
||||
}
|
||||
|
||||
|
||||
/// This actually sets the Zoom value when you're done doing
|
||||
/// a drag zoom.
|
||||
void TrackPanel::DragZoom(wxMouseEvent & event, int trackLeftEdge)
|
||||
|
@ -252,6 +252,7 @@ class AUDACITY_DLL_API TrackPanel:public wxPanel {
|
||||
virtual void OnTrackSolo(bool shiftdown, Track *t = NULL);
|
||||
virtual void OnTrackClose();
|
||||
virtual Track * GetFirstSelectedTrack();
|
||||
virtual bool IsMouseCaptured();
|
||||
|
||||
virtual void EnsureVisible(Track * t);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user