mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-08 20:52:09 +01:00
TrackPanelMouseEvent stores shared_ptr to cell; some handles too...
... those handles that force a simulated button-up when play interrupts drag, and can assume that pointers to tracks remain nonNULL and part of the current project state (not the undo history). Also pass shared_ptr to Track into more hit test routines.
This commit is contained in:
@@ -70,8 +70,8 @@ UIHandle::Result TrackPanelResizeHandle::Click
|
||||
(const TrackPanelMouseEvent &evt, AudacityProject *pProject)
|
||||
{
|
||||
const wxMouseEvent &event = evt.event;
|
||||
CommonTrackPanelCell *const pCell =
|
||||
static_cast<CommonTrackPanelCell*>(evt.pCell);
|
||||
const auto pCell =
|
||||
static_cast<CommonTrackPanelCell*>(evt.pCell.get());
|
||||
auto track = pCell->FindTrack().get();
|
||||
if (track && dynamic_cast< TrackControls * >( pCell )) {
|
||||
// Clicked under a label;
|
||||
|
||||
Reference in New Issue
Block a user