mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-02 06:40:12 +01:00
Require a ProjectWindow as ancestor of effect dialog...
... by passing parent as reference, not pointer, and testing in the dialog factory function. This is important so that we know the lifetime of an effect dialog, even when it is non-modal, is bounded by the lifetime of the associated project.
This commit is contained in:
@@ -142,7 +142,8 @@ class AUDACITY_DLL_API EffectClientInterface /* not final */ : public EffectDef
|
||||
{
|
||||
public:
|
||||
using EffectDialogFactory = std::function<
|
||||
wxDialog* ( wxWindow*, EffectHostInterface*, EffectUIClientInterface* )
|
||||
wxDialog* ( wxWindow &parent,
|
||||
EffectHostInterface*, EffectUIClientInterface* )
|
||||
>;
|
||||
|
||||
virtual ~EffectClientInterface() {};
|
||||
@@ -179,7 +180,7 @@ public:
|
||||
virtual bool RealtimeProcessEnd() = 0;
|
||||
|
||||
virtual bool ShowInterface(
|
||||
wxWindow *parent, const EffectDialogFactory &factory,
|
||||
wxWindow &parent, const EffectDialogFactory &factory,
|
||||
bool forceModal = false
|
||||
) = 0;
|
||||
// Some effects will use define params to define what parameters they take.
|
||||
|
||||
Reference in New Issue
Block a user