Permalink
Browse files

Allow controlling VST effects without own GUI

  • Loading branch information...
PhysSong committed May 20, 2018
1 parent 55d3fbc commit 235e8eef6fef278dee2dbe0869256aa915afb068
Showing with 5 additions and 6 deletions.
  1. +4 −4 plugins/VstEffect/VstEffectControlDialog.cpp
  2. +1 −2 plugins/VstEffect/VstEffectControls.cpp
@@ -62,14 +62,14 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
embed_vst = m_plugin->embedMethod() != "none";
if (embed_vst) {
if (! m_plugin->pluginWidget()) {
if (m_plugin->hasEditor() && ! m_plugin->pluginWidget()) {
m_plugin->createUI(this);
}
m_pluginWidget = m_plugin->pluginWidget();
}
}
if ( m_plugin && (!embed_vst || m_pluginWidget) )
if (m_plugin)
{
setWindowTitle( m_plugin->name() );
@@ -218,7 +218,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
int newSize = 0;
if (embed_vst) {
if (m_pluginWidget) {
newSize = m_pluginWidget->width() + 20;
}
newSize = std::max(newSize, 250);
@@ -234,7 +234,7 @@ VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
l->addItem( new QSpacerItem( newSize - 20, 30, QSizePolicy::Fixed,
QSizePolicy::Fixed ), 1, 0 );
l->addWidget( resize, 2, 0, 1, 1, Qt::AlignCenter );
if (embed_vst) {
if (m_pluginWidget) {
l->addWidget( m_pluginWidget, 3, 0, 1, 1, Qt::AlignCenter );
}
l->setRowStretch( 5, 1 );
@@ -141,8 +141,7 @@ void VstEffectControls::saveSettings( QDomDocument & _doc, QDomElement & _this )
int VstEffectControls::controlCount()
{
return m_effect->m_plugin != NULL &&
m_effect->m_plugin->hasEditor() ? 1 : 0;
return m_effect->m_plugin != NULL ? 1 : 0;
}

0 comments on commit 235e8ee

Please sign in to comment.