Skip to content

Commit

Permalink
VST: Add workaround for small effect window on project load
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-w authored and PhysSong committed May 30, 2018
1 parent 8e9f74d commit b808631
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion plugins/VstEffect/VstEffectControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <QToolBar>
#include <QLabel>


VstEffectControlDialog::VstEffectControlDialog( VstEffectControls * _ctl ) :
EffectControlDialog( _ctl ),
m_pluginWidget( NULL ),
Expand Down Expand Up @@ -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();
}
}




Expand Down
1 change: 1 addition & 0 deletions plugins/VstEffect/VstEffectControlDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class VstEffectControlDialog : public EffectControlDialog

protected:
virtual void paintEvent( QPaintEvent * _pe );
virtual void showEvent( QShowEvent* _se ) override;

private:
QWidget * m_pluginWidget;
Expand Down

0 comments on commit b808631

Please sign in to comment.