From 55d3fbc9085c19a0ca4976328358a03ebb886da9 Mon Sep 17 00:00:00 2001 From: Hyunin Song Date: Sun, 20 May 2018 15:40:36 +0900 Subject: [PATCH] Fix RemoteVstPlugin not exiting when effect removed --- plugins/VstEffect/VstEffectControlDialog.cpp | 7 ++++++- src/gui/widgets/EffectView.cpp | 11 ----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/plugins/VstEffect/VstEffectControlDialog.cpp b/plugins/VstEffect/VstEffectControlDialog.cpp index 8445e97cc98..14866ec56d6 100644 --- a/plugins/VstEffect/VstEffectControlDialog.cpp +++ b/plugins/VstEffect/VstEffectControlDialog.cpp @@ -289,7 +289,12 @@ void VstEffectControlDialog::showEvent(QShowEvent *_se) VstEffectControlDialog::~VstEffectControlDialog() { - //delete m_pluginWidget; +#if !(QT_VERSION < 0x050000 && defined(LMMS_BUILD_LINUX)) + if (m_pluginWidget && layout()) { + layout()->removeWidget(m_pluginWidget); + m_pluginWidget->setParent(nullptr); + } +#endif } diff --git a/src/gui/widgets/EffectView.cpp b/src/gui/widgets/EffectView.cpp index 5faae3517df..6c74a459c9e 100644 --- a/src/gui/widgets/EffectView.cpp +++ b/src/gui/widgets/EffectView.cpp @@ -164,18 +164,7 @@ EffectView::EffectView( Effect * _model, QWidget * _parent ) : EffectView::~EffectView() { - -#ifdef LMMS_BUILD_LINUX - delete m_subWindow; -#else - if( m_subWindow ) - { - // otherwise on win32 build VST GUI can get lost - m_subWindow->hide(); - } -#endif - }