1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-05 15:55:45 +00:00

Fix warnings

This commit is contained in:
uramer 2022-01-28 21:45:13 +01:00
parent a972a54ea9
commit e78b8402fa
4 changed files with 8 additions and 7 deletions

View File

@ -729,7 +729,8 @@ namespace MWGui
void SettingsWindow::renderScriptSettings()
{
LuaUi::attachToWidget(mCurrentPage);
if (mCurrentPage >= 0)
LuaUi::attachToWidget(mCurrentPage);
mCurrentPage = -1;
mScriptList->removeAllItems();
mScriptView->setCanvasSize({0, 0});
@ -756,12 +757,12 @@ namespace MWGui
mScriptBox->setVisible(!disabled);
}
void SettingsWindow::onScriptFilterChange(MyGUI::Widget*)
void SettingsWindow::onScriptFilterChange(MyGUI::EditBox*)
{
renderScriptSettings();
}
void SettingsWindow::onScriptListSelection(MyGUI::Widget*, size_t index)
void SettingsWindow::onScriptListSelection(MyGUI::ListBox*, size_t index)
{
if (mCurrentPage >= 0)
LuaUi::attachToWidget(mCurrentPage);

View File

@ -78,8 +78,8 @@ namespace MWGui
void onWindowResize(MyGUI::Window* _sender);
void onScriptFilterChange(MyGUI::Widget*);
void onScriptListSelection(MyGUI::Widget*, size_t index);
void onScriptFilterChange(MyGUI::EditBox*);
void onScriptListSelection(MyGUI::ListBox*, size_t index);
void apply();

View File

@ -28,7 +28,7 @@ namespace LuaUi
void attachToWidget(size_t index, MyGUI::Widget* widget)
{
if (0 <= index && index < allSettings.size())
if (index < allSettings.size())
allSettings[index].mElement->attachToWidget(widget);
}
}

View File

@ -9,7 +9,7 @@
namespace LuaUi
{
class Element;
struct Element;
struct ScriptSettings
{
std::string mName;