Permalink
Browse files

VST: Add workaround for small effect window on project load

  • Loading branch information...
lukas-w authored and PhysSong committed Apr 29, 2018
1 parent 8e9f74d commit b8086319759dd40e2a957ca69998b73897b48132
Showing with 12 additions and 1 deletion.
  1. +11 −1 plugins/VstEffect/VstEffectControlDialog.cpp
  2. +1 −0 plugins/VstEffect/VstEffectControlDialog.h
@@ -41,7 +41,6 @@
#include <QToolBar>
#include <QLabel>
VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
EffectControlDialog( _ctl ),
m_pluginWidget( NULL ),
@@ -274,6 +273,17 @@ void VstEffectControlDialog::paintEvent( QPaintEvent * )
}
}
void VstEffectControlDialog::showEvent(QShowEvent *_se)
{
EffectControlDialog::showEvent( _se );
// Workaround for a (unexplained) bug where on project-load the effect
// control window has size 0 and would only restore to the proper size upon
// moving the window or interacting with it.
if (parentWidget()) {
parentWidget()->adjustSize();
}
}
@@ -50,6 +50,7 @@ class VstEffectControlDialog : public EffectControlDialog
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void showEvent( QShowEvent* _se ) override;
private:
QWidget * m_pluginWidget;

0 comments on commit b808631

Please sign in to comment.