Skip to content

Commit 4a301d3

Browse files
committed
Fix item focus after search.
1 parent b093dec commit 4a301d3

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

UoFiddler.Controls/UserControls/ItemsControl.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ public static bool SearchGraphic(int graphic)
105105
return false;
106106
}
107107

108+
// we have to invalidate focus so it will scroll to item
109+
RefMarker.ItemsTileView.FocusIndex = -1;
108110
RefMarker.SelectedGraphicId = graphic;
109111

110112
return true;
@@ -147,7 +149,10 @@ public static bool SearchName(string name, bool next)
147149
continue;
148150
}
149151

152+
// we have to invalidate focus so it will scroll to item
153+
RefMarker.ItemsTileView.FocusIndex = -1;
150154
RefMarker.SelectedGraphicId = RefMarker._itemList[i];
155+
151156
return true;
152157
}
153158

UoFiddler.Controls/UserControls/LandTilesControl.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ public static bool SearchGraphic(int graphic)
7171
return false;
7272
}
7373

74+
// we have to invalidate focus so it will scroll to item
75+
_refMarker.LandTilesTileView.FocusIndex = -1;
7476
_refMarker.SelectedGraphicId = graphic;
7577

7678
return true;
@@ -113,7 +115,10 @@ public static bool SearchName(string name, bool next)
113115
continue;
114116
}
115117

118+
// we have to invalidate focus so it will scroll to item
119+
_refMarker.LandTilesTileView.FocusIndex = -1;
116120
_refMarker.SelectedGraphicId = _refMarker._tileList[i];
121+
117122
return true;
118123
}
119124

UoFiddler.Controls/UserControls/TexturesControl.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ public static bool SearchGraphic(int graphic)
7474
return false;
7575
}
7676

77+
// we have to invalidate focus so it will scroll to item
78+
_refMarker.TextureTileView.FocusIndex = -1;
7779
_refMarker.SelectedTextureId = graphic;
7880

7981
return true;

0 commit comments

Comments
 (0)