mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-23 14:41:27 +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:
@@ -15,6 +15,7 @@ class wxMouseEvent;
|
||||
class wxRect;
|
||||
class wxSize;
|
||||
class TrackPanelCell;
|
||||
#include "MemoryX.h"
|
||||
|
||||
// Augment a mouse event with information about which track panel cell and
|
||||
// sub-rectangle was hit.
|
||||
@@ -22,7 +23,7 @@ struct TrackPanelMouseEvent
|
||||
{
|
||||
TrackPanelMouseEvent
|
||||
( wxMouseEvent &event_, const wxRect &rect_, const wxSize &whole_,
|
||||
TrackPanelCell *pCell_ )
|
||||
const std::shared_ptr<TrackPanelCell> &pCell_ )
|
||||
: event{ event_ }
|
||||
, rect{ rect_ }
|
||||
, whole{ whole_ }
|
||||
@@ -34,7 +35,7 @@ struct TrackPanelMouseEvent
|
||||
wxMouseEvent &event;
|
||||
const wxRect ▭
|
||||
const wxSize &whole;
|
||||
TrackPanelCell *pCell; // may be NULL
|
||||
std::shared_ptr<TrackPanelCell> pCell; // may be NULL
|
||||
double steps; // for mouse wheel rotation
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user