[Scummvm-git-logs] scummvm master -> 84a17741b6e4c0d2961420caf4acdf4edaad4924

sev- noreply at scummvm.org
Thu Jun 9 23:00:51 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
84a17741b6 GUI: Fix grid list highlight after editing game. Bug #3960


Commit: 84a17741b6e4c0d2961420caf4acdf4edaad4924
    https://github.com/scummvm/scummvm/commit/84a17741b6e4c0d2961420caf4acdf4edaad4924
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-10T01:00:07+02:00

Commit Message:
GUI: Fix grid list highlight after editing game. Bug #3960

Changed paths:
    gui/widgets/groupedlist.cpp


diff --git a/gui/widgets/groupedlist.cpp b/gui/widgets/groupedlist.cpp
index 349988fe6b2..c370b5f581d 100644
--- a/gui/widgets/groupedlist.cpp
+++ b/gui/widgets/groupedlist.cpp
@@ -174,11 +174,15 @@ void GroupedListWidget::setSelected(int item) {
 		if (_editMode)
 			abortEditMode();
 
-		_selectedItem = -1;
-		for (uint i = 0; i < _listIndex.size(); ++i) {
-			if (_listIndex[i] == item) {
-				_selectedItem = i;
-				break;
+		if (!_filter.empty()) {
+			_selectedItem = item;
+		} else {
+			_selectedItem = -1;
+			for (uint i = 0; i < _listIndex.size(); ++i) {
+				if (_listIndex[i] == item) {
+					_selectedItem = i;
+					break;
+				}
 			}
 		}
 




More information about the Scummvm-git-logs mailing list