1
0
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:
Paul Licameli
2020-01-06 10:09:18 -05:00
parent f50171ed00
commit bb26b2f2c4
27 changed files with 51 additions and 40 deletions

View File

@@ -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.