diff --git a/CHANGELOG.md b/CHANGELOG.md index abb10007ee..42db494f3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -73,6 +73,7 @@ Bug #7553: Faction reaction loading is incorrect Bug #7557: Terrain::ChunkManager::createChunk is called twice for the same position, lod on initial loading Bug #7573: Drain Fatigue can't bring fatigue below zero by default + Bug #7603: Scripts menu size is not updated properly Feature #3537: Shader-based water ripples Feature #5492: Let rain and snow collide with statics Feature #6149: Dehardcode Lua API_REVISION diff --git a/apps/openmw/mwgui/settingswindow.cpp b/apps/openmw/mwgui/settingswindow.cpp index b077d9f640..9fa842bfa9 100644 --- a/apps/openmw/mwgui/settingswindow.cpp +++ b/apps/openmw/mwgui/settingswindow.cpp @@ -230,6 +230,16 @@ namespace MWGui } } + void SettingsWindow::onFrame(float duration) + { + if (mScriptView->getVisible()) + { + const auto scriptsSize = mScriptAdapter->getSize(); + if (mScriptView->getCanvasSize() != scriptsSize) + mScriptView->setCanvasSize(scriptsSize); + } + } + void SettingsWindow::updateSliderLabel(MyGUI::ScrollBar* scroller, const std::string& value) { std::string labelWidgetName = scroller->getUserString("SettingLabelWidget"); @@ -1005,7 +1015,6 @@ namespace MWGui mScriptDisabled->setVisible(disabled); LuaUi::attachPageAt(mCurrentPage, mScriptAdapter); - mScriptView->setCanvasSize(mScriptAdapter->getSize()); } void SettingsWindow::onScriptFilterChange(MyGUI::EditBox*) @@ -1022,7 +1031,6 @@ namespace MWGui mCurrentPage = *mScriptList->getItemDataAt(index); LuaUi::attachPageAt(mCurrentPage, mScriptAdapter); } - mScriptView->setCanvasSize(mScriptAdapter->getSize()); } void SettingsWindow::onRebindAction(MyGUI::Widget* _sender) diff --git a/apps/openmw/mwgui/settingswindow.hpp b/apps/openmw/mwgui/settingswindow.hpp index ecf9bf0d94..1f96f7de54 100644 --- a/apps/openmw/mwgui/settingswindow.hpp +++ b/apps/openmw/mwgui/settingswindow.hpp @@ -14,6 +14,8 @@ namespace MWGui void onOpen() override; + void onFrame(float duration) override; + void updateControlsBox(); void updateLightSettings();