1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 09:09:47 +02:00

Bug 1819: Hover indication on note track channel toggle appears on all tracks (when they rerender)

This commit is contained in:
Pokechu22 2018-01-14 12:08:07 -08:00 committed by Paul Licameli
parent 8434c3903a
commit 1c36409da2
2 changed files with 3 additions and 1 deletions

View File

@ -2164,7 +2164,8 @@ void TrackInfo::MidiControlsDrawFunction
{
#ifdef EXPERIMENTAL_MIDI_OUT
auto target = dynamic_cast<NoteTrackButtonHandle*>( context.target.get() );
auto channel = target ? target->GetChannel() : -1;
bool hit = target && target->GetTrack().get() == pTrack;
auto channel = hit ? target->GetChannel() : -1;
auto &dc = context.dc;
wxRect midiRect = rect;
GetMidiControlsHorizontalBounds(rect, midiRect);

View File

@ -40,6 +40,7 @@ public:
const wxMouseState &state, const wxRect &rect,
const std::shared_ptr<NoteTrack> &pTrack);
std::shared_ptr<NoteTrack> GetTrack() const { return mpTrack.lock(); }
int GetChannel() const { return mChannel; }
static UIHandle::Result NeedChangeHighlight