From 8da2ebee5c511a2fe11dc1767c881046ac25ee69 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Wed, 12 Aug 2020 12:59:19 -0500 Subject: [PATCH] SelectionModel should only select the pending selection once (was reselecting it every time the items changed) --- src/client/spark/core/Utility/SelectionModel.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/spark/core/Utility/SelectionModel.cs b/src/client/spark/core/Utility/SelectionModel.cs index ef56f8d5b..ee5d43003 100644 --- a/src/client/spark/core/Utility/SelectionModel.cs +++ b/src/client/spark/core/Utility/SelectionModel.cs @@ -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; } }