VST: Add workaround for small effect window on project load

This commit is contained in:
Lukas W
2018-04-29 08:02:25 +02:00
committed by Hyunjin Song
parent 8e9f74df37
commit b808631975
2 changed files with 12 additions and 1 deletions

View File

@@ -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();
}
}

View File

@@ -50,6 +50,7 @@ public:
protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void showEvent( QShowEvent* _se ) override;
private:
QWidget * m_pluginWidget;