1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-30 13:34:33 +00:00

Merge branch 'itemviewfocus' into 'master'

Don't reset item view focus during realignment (#8771)

Closes #8771

See merge request OpenMW/openmw!4985
This commit is contained in:
Alexei Kotov 2025-11-10 06:33:56 +03:00
commit ba72415369

View file

@ -82,9 +82,10 @@ namespace MWGui
if (Settings::gui().mControllerMenus) if (Settings::gui().mControllerMenus)
{ {
mControllerFocus = -1;
if (mItemCount > 0) if (mItemCount > 0)
mControllerFocus = std::clamp(mControllerFocus, 0, mItemCount - 1); mControllerFocus = std::clamp(mControllerFocus, 0, mItemCount - 1);
else
mControllerFocus = -1;
updateControllerFocus(-1, mControllerFocus); updateControllerFocus(-1, mControllerFocus);
} }