diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 82cf08e25..ec9b7ae9e 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -1363,9 +1363,22 @@ void TrackPanel::SetCursorAndTipWhenInLabel( Track * t, SetCursor(event.ShiftDown() ? *mZoomOutCursor : *mZoomInCursor); } #endif + else if (event.m_x >= GetVRulerOffset() ){ + // In VRuler but probably in a label track, and clicks don't do anything here, so no tip. + // Use a space for the tip, otherwsie we get he default message. + // TODO: Maybe the code for label tracks SHOULD treat the VRuler as part of the TrackInfo? + tip = wxT(" "); + SetCursor( *mArrowCursor ); + } + else if( GetTrackCount() > 1 ){ + // Set a status message if over TrackInfo. + //tip = _("Drag the track vertically to change the order of the tracks."); + tip = _("Ctrl-Click to select or deselect track. Drag up or down to change track order."); + SetCursor( *mArrowCursor ); + } else { // Set a status message if over TrackInfo. - tip = _("Drag the track vertically to change the order of the tracks."); + tip = _("Ctrl-Click to select or deselect track."); SetCursor(*mArrowCursor); } } @@ -1547,6 +1560,8 @@ void TrackPanel::SetCursorAndTipWhenSelectTool( Track * t, } const bool bShiftDown = event.ShiftDown(); + const bool bCtrlDown = event.ControlDown(); + const bool bModifierDown = bShiftDown || bCtrlDown; #ifdef EXPERIMENTAL_SPECTRAL_EDITING if ( (mFreqSelMode == FREQ_SEL_SNAPPING_CENTER) && @@ -1562,7 +1577,7 @@ void TrackPanel::SetCursorAndTipWhenSelectTool( Track * t, // choose boundaries only in snapping tolerance, // and may choose center. SelectionBoundary boundary = - ChooseBoundary(event, t, rect, !bShiftDown, !bShiftDown); + ChooseBoundary(event, t, rect, !bModifierDown, !bModifierDown); #ifdef USE_MIDI // The MIDI HitTest will only succeed if we are on a midi track, so @@ -1879,6 +1894,11 @@ void TrackPanel::SelectTrack(Track *pTrack, bool selected, bool updateLastPicked } } +size_t TrackPanel::GetTrackCount(){ + auto tracks = GetTracks(); + return (size_t)tracks->GetCount(); +} + size_t TrackPanel::GetSelectedTrackCount(){ size_t count = 0; diff --git a/src/TrackPanel.h b/src/TrackPanel.h index 15e489ca0..c03b711b1 100644 --- a/src/TrackPanel.h +++ b/src/TrackPanel.h @@ -291,6 +291,7 @@ class AUDACITY_DLL_API TrackPanel final : public OverlayPanel { // AS: Selection handling void SelectTrack(Track *track, bool selected, bool updateLastPicked = true); void SelectRangeOfTracks(Track *sTrack, Track *eTrack); + size_t GetTrackCount(); size_t GetSelectedTrackCount(); virtual void HandleSelect(wxMouseEvent & event); virtual void SelectionHandleDrag(wxMouseEvent &event, Track *pTrack);