Skip to content

Commit

Permalink
fix resizing to previous size if width or height did not change
Browse files Browse the repository at this point in the history
  • Loading branch information
scheffle committed Sep 5, 2024
1 parent de060e0 commit e648f0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion vstgui/plugin-bindings/vst3editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1952,8 +1952,12 @@ bool VST3Editor::enableEditing (bool state)
tmp.right = getRect ().getWidth ();
if (getRect ().getHeight () != height)
tmp.bottom = getRect ().getHeight ();
if (tmp.getWidth () && tmp.getHeight ())
if (tmp.getWidth () || tmp.getHeight ())
{
if (tmp.getWidth () == 0)
tmp.right = width;
if (tmp.getHeight () == 0)
tmp.bottom = width;
checkSizeConstraint (&tmp);
nonEditRect.setWidth (tmp.getWidth ());
nonEditRect.setHeight (tmp.getHeight ());
Expand All @@ -1969,6 +1973,7 @@ bool VST3Editor::enableEditing (bool state)
rect.right = rect.left + (Steinberg::int32)nonEditRect.getWidth ();
rect.bottom = rect.top + (Steinberg::int32)nonEditRect.getHeight ();
plugFrame->resizeView (this, &rect);
getFrame ()->setSize (rect.getWidth (), rect.getHeight ());
}
else
{
Expand Down

0 comments on commit e648f0c

Please sign in to comment.