1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-18 04:01:06 +02:00

weak_ptr not events to avoid dangling track pointers in UIHandles

This commit is contained in:
Paul Licameli
2017-06-24 17:04:07 -04:00
parent 321919301e
commit fa5a742e22
16 changed files with 182 additions and 236 deletions

View File

@@ -85,11 +85,16 @@ public:
// Whether to force Release (not Cancel!) of the drag when a
// keystroke command is about to be dispatched. Default is always false.
// When default is false, any remembered pointers to tracks should be
// weak_ptrs.
virtual bool StopsOnKeystroke();
// Notification after a command is dispatched; generally, it will need to
// be overridden only in case StopsOnKeystroke() returns false. Default
// does nothing.
// PRL: all former uses of this are now accomplished with weak_ptr instead
// to avoid dangling pointers to tracks. But maybe there will be a future
// use?
virtual void OnProjectChange(AudacityProject *pProject);
};