mirror of
https://github.com/cookiengineer/audacity
synced 2026-03-31 11:35:50 +02:00
Define BackgoundCell, move some things into it
This commit is contained in:
@@ -1458,22 +1458,13 @@ void TrackPanel::HandleCursor(wxMouseEvent & event)
|
||||
if( SetCursorByActivity() )
|
||||
return;
|
||||
|
||||
// (2) If we are not over a track at all, set the cursor to Arrow and
|
||||
// clear the StatusBar,
|
||||
|
||||
const auto foundCell = FindCell( event.m_x, event.m_y );
|
||||
auto &track = foundCell.pTrack;
|
||||
auto &rect = foundCell.rect;
|
||||
auto &pCell = foundCell.pCell;
|
||||
wxCursor *pCursor = NULL;
|
||||
|
||||
if (!track) {
|
||||
SetCursor(*mArrowCursor);
|
||||
mListener->TP_DisplayStatusMessage(wxT(""));
|
||||
return;
|
||||
}
|
||||
|
||||
// (3) The easy cases are done.
|
||||
// (2) The easy cases are done.
|
||||
// Now we've got to hit-test against a number of different possibilities.
|
||||
// We could be over the label or a vertical ruler etc...
|
||||
|
||||
@@ -4174,14 +4165,6 @@ void TrackPanel::HandleTrackSpecificMouseEvent(wxMouseEvent & event)
|
||||
return;
|
||||
}
|
||||
|
||||
// AS: If the user clicked outside all tracks, make nothing
|
||||
// selected.
|
||||
if ((event.ButtonDown() || event.ButtonDClick()) && !pTrack) {
|
||||
GetSelectionState().SelectNone( *mTracks, GetMixerBoard() );
|
||||
Refresh(false);
|
||||
return;
|
||||
}
|
||||
|
||||
//Determine if user clicked on the track's left-hand label or ruler
|
||||
if ( !( foundCell.type == CellType::Track ||
|
||||
foundCell.type == CellType::Background ) ) {
|
||||
|
||||
Reference in New Issue
Block a user