Skip to content

Commit

Permalink
fix: mousable area may become different when setting the view size re…
Browse files Browse the repository at this point in the history
…sults in a different view size
  • Loading branch information
scheffle committed Mar 1, 2024
1 parent fd2ce47 commit 670354d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vstgui/lib/cviewcontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ void CViewContainer::setViewSize (const CRect &rect, bool invalid)
int32_t autosize = pV->getAutosizeFlags ();
CRect viewSize (pV->getViewSize ());
CRect mouseSize (pV->getMouseableArea ());
bool viewSizeIsMouseSize = viewSize == mouseSize;
if (treatAsColumn)
{
if (counter)
Expand Down Expand Up @@ -356,7 +357,7 @@ void CViewContainer::setViewSize (const CRect &rect, bool invalid)
if (viewSize != pV->getViewSize ())
{
pV->setViewSize (viewSize);
pV->setMouseableArea (mouseSize);
pV->setMouseableArea (viewSizeIsMouseSize ? pV->getViewSize () : mouseSize);
}
counter++;
}
Expand Down

0 comments on commit 670354d

Please sign in to comment.