Skip to content

Commit

Permalink
Update layout when camera window toolbar is hidden or shown
Browse files Browse the repository at this point in the history
Although the actual visibility of the toolbars changes immediately, it seems
that WxWidgets doesn't automatically update the sizer layout afterwards, so
having hidden the toolbars we are left with just the grey background unless we
force a layout update manually.
  • Loading branch information
Matthew Mott committed Sep 3, 2019
1 parent 7ea2eab commit 97d68c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions radiant/camera/CamWnd.cpp
Expand Up @@ -265,6 +265,10 @@ void CamWnd::updateToolbarVisibility()

_mainWxWidget->FindWindow("CamToolbar")->Show(visible);
_mainWxWidget->FindWindow("MiscToolbar")->Show(visible);

// WxWidgets/GTK doesn't seem to automatically refresh the layout when we
// hide/show the toolbars
_mainWxWidget->GetSizer()->Layout();
}

void CamWnd::onGLExtensionsInitialised()
Expand Down

0 comments on commit 97d68c9

Please sign in to comment.