mirror of
https://github.com/GTNewHorizons/BetterP2P.git
synced 2026-11-23 13:29:39 +00:00
Fix disappearing bind button when renaming search
GuiAdvancedMemoryCard: When the rename field is used, it filters out every P2P tunnel that does not match the name, including the currently selected P2P tunnel, from an internal list. This internal list is used to determine whether the bind button should be shown, and if there is no selected P2P tunnel, they are not shown. Since we removed the P2P tunnel from the internal list, they are not shown. :( Fix by using the master list instead of the filtered list.
This commit is contained in:
1 parent
74422c75f6
commit
9dad0d79e4
1 file changed
+1
-1
@@ -44,7 +44,7 @@ class GuiAdvancedMemoryCard(msg: S2CListP2P) : GuiScreen(), TextureBound {
|
||||
private var sortedInfo = infos.toList()
|
||||
|
||||
private var selectedInfo: InfoWrapper?
|
||||
get() = sortedInfo.find { it.index == selectedIndex }
|
||||
get() = infos.find { it.index == selectedIndex }
|
||||
set(value) {
|
||||
selectedIndex = value?.index ?: -1
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user