Skip to content

Commit 235e8ee

Browse files
committed
Allow controlling VST effects without own GUI
1 parent 55d3fbc commit 235e8ee

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

plugins/VstEffect/VstEffectControlDialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
6262
embed_vst = m_plugin->embedMethod() != "none";
6363

6464
if (embed_vst) {
65-
if (! m_plugin->pluginWidget()) {
65+
if (m_plugin->hasEditor() && ! m_plugin->pluginWidget()) {
6666
m_plugin->createUI(this);
6767
}
6868
m_pluginWidget = m_plugin->pluginWidget();
6969
}
7070
}
7171

72-
if ( m_plugin && (!embed_vst || m_pluginWidget) )
72+
if (m_plugin)
7373
{
7474
setWindowTitle( m_plugin->name() );
7575

@@ -218,7 +218,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
218218

219219
int newSize = 0;
220220

221-
if (embed_vst) {
221+
if (m_pluginWidget) {
222222
newSize = m_pluginWidget->width() + 20;
223223
}
224224
newSize = std::max(newSize, 250);
@@ -234,7 +234,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
234234
l->addItem( new QSpacerItem( newSize - 20, 30, QSizePolicy::Fixed,
235235
QSizePolicy::Fixed ), 1, 0 );
236236
l->addWidget( resize, 2, 0, 1, 1, Qt::AlignCenter );
237-
if (embed_vst) {
237+
if (m_pluginWidget) {
238238
l->addWidget( m_pluginWidget, 3, 0, 1, 1, Qt::AlignCenter );
239239
}
240240
l->setRowStretch( 5, 1 );

plugins/VstEffect/VstEffectControls.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,7 @@ void VstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
141141

142142
int VstEffectControls::controlCount()
143143
{
144-
return m_effect->m_plugin != NULL &&
145-
m_effect->m_plugin->hasEditor() ? 1 : 0;
144+
return m_effect->m_plugin != NULL ? 1 : 0;
146145
}
147146

148147

0 commit comments

Comments
 (0)