mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-27 15:11:36 -04:00
Fix updating of character preview size in InventoryWindow::setGuiMode
This commit is contained in:
parent
ac366f1603
commit
8fb328ef4f
@ -167,13 +167,15 @@ namespace MWGui
|
|||||||
MyGUI::IntSize size(static_cast<int>(Settings::Manager::getFloat(setting + " w", "Windows") * viewSize.width),
|
MyGUI::IntSize size(static_cast<int>(Settings::Manager::getFloat(setting + " w", "Windows") * viewSize.width),
|
||||||
static_cast<int>(Settings::Manager::getFloat(setting + " h", "Windows") * viewSize.height));
|
static_cast<int>(Settings::Manager::getFloat(setting + " h", "Windows") * viewSize.height));
|
||||||
|
|
||||||
|
bool needUpdate = (size.width != mMainWidget->getWidth() || size.height != mMainWidget->getHeight());
|
||||||
|
|
||||||
mMainWidget->setPosition(pos);
|
mMainWidget->setPosition(pos);
|
||||||
mMainWidget->setSize(size);
|
mMainWidget->setSize(size);
|
||||||
|
|
||||||
if (size.width != mMainWidget->getWidth() || size.height != mMainWidget->getHeight())
|
|
||||||
updatePreviewSize();
|
|
||||||
|
|
||||||
adjustPanes();
|
adjustPanes();
|
||||||
|
|
||||||
|
if (needUpdate)
|
||||||
|
updatePreviewSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
SortFilterItemModel* InventoryWindow::getSortFilterModel()
|
SortFilterItemModel* InventoryWindow::getSortFilterModel()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user