From 944e6d0844158d67c3a6041db1b29c4685ef2797 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 26 Oct 2015 14:25:44 +0100 Subject: [PATCH] Fix adjustment of inventory preview size when guimode changes (Fixes #2973) --- apps/openmw/mwgui/inventorywindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index f5a5f023f0..c1e202bc02 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -167,11 +167,12 @@ namespace MWGui MyGUI::IntSize size(static_cast(Settings::Manager::getFloat(setting + " w", "Windows") * viewSize.width), static_cast(Settings::Manager::getFloat(setting + " h", "Windows") * viewSize.height)); + mMainWidget->setPosition(pos); + mMainWidget->setSize(size); + if (size.width != mMainWidget->getWidth() || size.height != mMainWidget->getHeight()) updatePreviewSize(); - mMainWidget->setPosition(pos); - mMainWidget->setSize(size); adjustPanes(); }