SelectionModel should only select the pending selection once (was reselecting it every time the items changed)

This commit is contained in:
John Colvin committed 2020-08-12 12:59:19 -05:00
1 parent d03c74f270
commit 8da2ebee5c
1 file changed
+2 -1
@@ -242,7 +242,8 @@ namespace mbts.ui.utility {
}
if (_map.Count != this.items.Count)
throw new InvalidOperationException("Map and items are out of sync (different item counts).");
try_select(target_key, _is_pending_selection || _items.Count == 0);
if (try_select(target_key, _is_pending_selection || _items.Count == 0) && _is_pending_selection)
_is_pending_selection = false;
}
}