mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-28 14:18:41 +02:00
Show drag cursor to rearrange tracks only when there is more than one
This commit is contained in:
parent
e4d5eefee0
commit
adb46093fa
@ -149,7 +149,7 @@ HitTestPreview TrackSelectHandle::Preview
|
|||||||
//static wxCursor rearrangeCursor{ wxCURSOR_HAND };
|
//static wxCursor rearrangeCursor{ wxCURSOR_HAND };
|
||||||
static auto rearrangingCursor =
|
static auto rearrangingCursor =
|
||||||
::MakeCursor(wxCURSOR_HAND, RearrangingCursorXpm, 16, 16);
|
::MakeCursor(wxCURSOR_HAND, RearrangingCursorXpm, 16, 16);
|
||||||
|
static wxCursor arrowCursor{ wxCURSOR_ARROW };
|
||||||
|
|
||||||
//static auto hoverCursor =
|
//static auto hoverCursor =
|
||||||
// ::MakeCursor(wxCURSOR_HAND, RearrangeCursorXpm, 16, 16);
|
// ::MakeCursor(wxCURSOR_HAND, RearrangeCursorXpm, 16, 16);
|
||||||
@ -161,18 +161,20 @@ HitTestPreview TrackSelectHandle::Preview
|
|||||||
if (mClicked) {
|
if (mClicked) {
|
||||||
const bool unsafe =
|
const bool unsafe =
|
||||||
ProjectAudioIO::Get( *project ).IsAudioActive();
|
ProjectAudioIO::Get( *project ).IsAudioActive();
|
||||||
|
const bool canMove = TrackList::Get( *project ).Leaders().size() > 1;
|
||||||
return {
|
return {
|
||||||
message,
|
message,
|
||||||
(unsafe
|
(unsafe
|
||||||
? &*disabledCursor
|
? &*disabledCursor
|
||||||
: &*rearrangingCursor)
|
: canMove
|
||||||
|
? &*rearrangingCursor
|
||||||
|
: &arrowCursor)
|
||||||
// , message // Stop showing the tooltip after the click
|
// , message // Stop showing the tooltip after the click
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Only mouse-over
|
// Only mouse-over
|
||||||
// Don't test safety, because the click to change selection is allowed
|
// Don't test safety, because the click to change selection is allowed
|
||||||
static wxCursor arrowCursor{ wxCURSOR_ARROW };
|
|
||||||
return {
|
return {
|
||||||
message,
|
message,
|
||||||
&arrowCursor,
|
&arrowCursor,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user