mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-05 22:07:42 +02:00
Extras like snap guidelines can be drawn for targets not yet clicked
This commit is contained in:
@@ -1906,8 +1906,9 @@ void TrackPanel::DrawEverythingElse(TrackPanelDrawingContext &context,
|
||||
#endif
|
||||
}
|
||||
|
||||
if (mUIHandle)
|
||||
mUIHandle->DrawExtras(UIHandle::Cells, dc, region, clip);
|
||||
auto target = Target();
|
||||
if (target)
|
||||
target->DrawExtras(UIHandle::Cells, dc, region, clip);
|
||||
|
||||
// Paint over the part below the tracks
|
||||
trackRect.y += trackRect.height;
|
||||
@@ -1929,8 +1930,8 @@ void TrackPanel::DrawEverythingElse(TrackPanelDrawingContext &context,
|
||||
HighlightFocusedTrack(dc, focusRect);
|
||||
}
|
||||
|
||||
if (mUIHandle)
|
||||
mUIHandle->DrawExtras(UIHandle::Panel, dc, region, clip);
|
||||
if (target)
|
||||
target->DrawExtras(UIHandle::Panel, dc, region, clip);
|
||||
}
|
||||
|
||||
// Make this #include go away!
|
||||
|
||||
@@ -89,6 +89,8 @@ public:
|
||||
// If pass is Cells, then any drawing that extends outside the cells
|
||||
// is later overlaid with the cell bevels and the empty background color.
|
||||
// Otherwise (Panel), it is a later drawing pass that will not be overlaid.
|
||||
// This is invoked on the hit test target even before it is clicked,
|
||||
// and also during drag.
|
||||
virtual void DrawExtras
|
||||
(DrawingPass pass,
|
||||
wxDC * dc, const wxRegion &updateRegion, const wxRect &panelRect);
|
||||
|
||||
Reference in New Issue
Block a user