1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-09 16:41:14 +02:00

Tooltip for click and drag on TCP

This commit is contained in:
Paul Licameli 2017-07-16 22:46:31 -04:00
parent 42921b7e55
commit 77d5a4cfa8

View File

@ -155,16 +155,18 @@ HitTestPreview TrackSelectHandle::Preview
{
const auto trackCount = project->GetTrackPanel()->GetTrackCount();
if (mClicked) {
auto message = Message(trackCount);
static auto disabledCursor =
::MakeCursor(wxCURSOR_NO_ENTRY, DisabledCursorXpm, 16, 16);
static wxCursor rearrangeCursor{ wxCURSOR_HAND };
const bool unsafe = GetActiveProject()->IsAudioActive();
return {
Message(trackCount),
message,
(unsafe
? &*disabledCursor
: &rearrangeCursor)
: &rearrangeCursor),
message
};
}
else {
@ -172,8 +174,9 @@ HitTestPreview TrackSelectHandle::Preview
// Don't test safety, because the click to change selection is allowed
static wxCursor arrowCursor{ wxCURSOR_ARROW };
return {
Message(trackCount),
&arrowCursor
message,
&arrowCursor,
message
};
}
}