mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-30 15:39:27 +02:00
Update TrackPanel cursor for unmoving mouse, changing display...
... This fix might not be exhaust the possibilities. Some examples covered: When an undo state is pushed. For instance: Hover over bottom of sole track for resize cursor, then Shift+C to delete it. (Cursor change used to happen at Shift key up, now sooner. Maybe your shortcut does not include Shift.) When an undo state is modified without a push. For instance: hover over right edge of selection. Hit Shift+Ctrl+A to remove the selection. (Again, change cursor before keys up, and even if no modifiers in the shortcut.) When scrollbars change for any reason, such as pinned play or Shift+scrollwheel. (Clip boundaries may pass your mouse. Cursor change and also snap lines come and go.)
This commit is contained in:
parent
7591a65e56
commit
e61e60ad25
@ -2031,6 +2031,9 @@ void AudacityProject::FixScrollbars()
|
||||
if (oldhstate != newhstate || oldvstate != newvstate) {
|
||||
UpdateLayout();
|
||||
}
|
||||
|
||||
CallAfter(
|
||||
[this]{ GetTrackPanel()->HandleCursorForPresentMouseState(); } );
|
||||
}
|
||||
|
||||
std::shared_ptr<Track> AudacityProject::GetFirstVisible()
|
||||
@ -2278,6 +2281,9 @@ void AudacityProject::DoScroll()
|
||||
if (!mAutoScrolling) {
|
||||
mTrackPanel->Refresh(false);
|
||||
}
|
||||
|
||||
CallAfter(
|
||||
[this]{ GetTrackPanel()->HandleCursorForPresentMouseState(); } );
|
||||
}
|
||||
|
||||
bool AudacityProject::ReportIfActionNotAllowed
|
||||
@ -4490,6 +4496,8 @@ void AudacityProject::PushState(const wxString &desc,
|
||||
this->DoZoomFitV();
|
||||
if((flags & UndoPush::AUTOSAVE) != UndoPush::MINIMAL)
|
||||
AutoSave();
|
||||
|
||||
GetTrackPanel()->HandleCursorForPresentMouseState();
|
||||
}
|
||||
|
||||
void AudacityProject::RollbackState()
|
||||
@ -4502,6 +4510,7 @@ void AudacityProject::ModifyState(bool bWantsAutoSave)
|
||||
GetUndoManager()->ModifyState(GetTracks(), mViewInfo.selectedRegion, mTags);
|
||||
if (bWantsAutoSave)
|
||||
AutoSave();
|
||||
GetTrackPanel()->HandleCursorForPresentMouseState();
|
||||
}
|
||||
|
||||
// LL: Is there a memory leak here as "l" and "t" are not deleted???
|
||||
|
Loading…
x
Reference in New Issue
Block a user