mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-31 07:59:27 +02:00
Still better cursor handling: change cursor at once...
... on start or stop of transport, in cases as described in the previous commit comment, even if the pointer does not move.
This commit is contained in:
parent
d9a91c1431
commit
34026d19fd
@ -349,6 +349,10 @@ TrackPanel::TrackPanel(wxWindow * parent, wxWindowID id,
|
||||
wxCommandEventHandler(TrackPanel::OnTrackListUpdated),
|
||||
NULL,
|
||||
this);
|
||||
wxTheApp->Connect(EVT_AUDIOIO_PLAYBACK,
|
||||
wxCommandEventHandler(TrackPanel::OnPlayback),
|
||||
NULL,
|
||||
this);
|
||||
}
|
||||
|
||||
|
||||
@ -365,6 +369,10 @@ TrackPanel::~TrackPanel()
|
||||
wxCommandEventHandler(TrackPanel::OnTrackListResized),
|
||||
NULL,
|
||||
this);
|
||||
wxTheApp->Disconnect(EVT_AUDIOIO_PLAYBACK,
|
||||
wxCommandEventHandler(TrackPanel::OnPlayback),
|
||||
NULL,
|
||||
this);
|
||||
|
||||
// This can happen if a label is being edited and the user presses
|
||||
// ALT+F4 or Command+Q
|
||||
@ -984,6 +992,12 @@ void TrackPanel::UpdateViewIfNoTracks()
|
||||
}
|
||||
}
|
||||
|
||||
void TrackPanel::OnPlayback(wxCommandEvent &e)
|
||||
{
|
||||
e.Skip();
|
||||
CallAfter( [this] { HandleCursorForLastMouseEvent(); } );
|
||||
}
|
||||
|
||||
// The tracks positions within the list have changed, so update the vertical
|
||||
// ruler size for the track that triggered the event.
|
||||
void TrackPanel::OnTrackListResized(wxCommandEvent & e)
|
||||
@ -1548,7 +1562,6 @@ void TrackPanel::HandleClick( const TrackPanelMouseEvent &tpmEvent )
|
||||
mUIHandle = &TrackPanelResizeHandle::Instance();
|
||||
}
|
||||
|
||||
//Determine if user clicked on the track's left-hand label or ruler
|
||||
if ( !mUIHandle && pCell )
|
||||
mUIHandle =
|
||||
pCell->HitTest( tpmEvent, GetProject() ).handle;
|
||||
|
@ -275,6 +275,7 @@ class AUDACITY_DLL_API TrackPanel final : public OverlayPanel {
|
||||
|
||||
void OnContextMenu(wxContextMenuEvent & event);
|
||||
|
||||
void OnPlayback(wxCommandEvent &);
|
||||
void OnTrackListResized(wxCommandEvent & event);
|
||||
void OnTrackListUpdated(wxCommandEvent & event);
|
||||
void UpdateViewIfNoTracks(); // Call this to update mViewInfo, etc, after track(s) removal, before Refresh().
|
||||
|
Loading…
x
Reference in New Issue
Block a user