From 16a8fa71dbf92c6215814699a439dda0b1c7e355 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Wed, 11 Mar 2020 01:19:38 -0500 Subject: [PATCH] Bug 625 - Track Pan / Gain sliders don't show tool tip on hover This "should" correct the "double" tooltips mentioned in comment #7 of the bug report. --- src/CellularPanel.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/CellularPanel.cpp b/src/CellularPanel.cpp index 0b68c23fd..ea7712b28 100644 --- a/src/CellularPanel.cpp +++ b/src/CellularPanel.cpp @@ -84,8 +84,6 @@ struct CellularPanel::State size_t mTarget {}; unsigned mMouseOverUpdateFlags{}; - wxString mToolTip; - int mMouseMostRecentX; int mMouseMostRecentY; @@ -276,7 +274,6 @@ void CellularPanel::HandleMotion TranslatableString status, tooltip; wxCursor *pCursor{}; unsigned refreshCode = 0; - if ( ! doHit ) { // Dragging or not handle = Target(); @@ -375,11 +372,11 @@ void CellularPanel::HandleMotion UpdateStatusMessage(status); #if wxUSE_TOOLTIPS - if (tooltip.Translation() != state.mToolTip) { + if (tooltip.Translation() != GetToolTipText()) { // Unset first, by analogy with AButton UnsetToolTip(); - SetToolTip(tooltip); - state.mToolTip = tooltip.Translation(); + if (handle != oldHandle) + SetToolTip(tooltip); } #endif @@ -818,11 +815,6 @@ catch( ... ) void CellularPanel::HandleClick( const TrackPanelMouseEvent &tpmEvent ) { -#if wxUSE_TOOLTIPS - // Any click should cancel the tooltip - UnsetToolTip(); -#endif - auto pCell = tpmEvent.pCell; // Do hit test once more, in case the button really pressed was not the // one "anticipated."