mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-25 07:43:54 +02:00
Bug 1819: Hover indication on note track channel toggle appears on all tracks (when they rerender)
This commit is contained in:
@@ -2164,7 +2164,8 @@ void TrackInfo::MidiControlsDrawFunction
|
|||||||
{
|
{
|
||||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||||
auto target = dynamic_cast<NoteTrackButtonHandle*>( context.target.get() );
|
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;
|
auto &dc = context.dc;
|
||||||
wxRect midiRect = rect;
|
wxRect midiRect = rect;
|
||||||
GetMidiControlsHorizontalBounds(rect, midiRect);
|
GetMidiControlsHorizontalBounds(rect, midiRect);
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public:
|
|||||||
const wxMouseState &state, const wxRect &rect,
|
const wxMouseState &state, const wxRect &rect,
|
||||||
const std::shared_ptr<NoteTrack> &pTrack);
|
const std::shared_ptr<NoteTrack> &pTrack);
|
||||||
|
|
||||||
|
std::shared_ptr<NoteTrack> GetTrack() const { return mpTrack.lock(); }
|
||||||
int GetChannel() const { return mChannel; }
|
int GetChannel() const { return mChannel; }
|
||||||
|
|
||||||
static UIHandle::Result NeedChangeHighlight
|
static UIHandle::Result NeedChangeHighlight
|
||||||
|
|||||||
Reference in New Issue
Block a user