From 8aec2ce3549ff0a39308d47fd3f136eaa8068639 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 13 Jul 2010 18:43:30 +0300 Subject: EXT-7668 FIXED prohibited deselecting a single selected item w/o using CTRL Reviewed by Vadim Savchuk at https://codereview.productengine.com/secondlife/r/746/ --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index f9e08a3f4c..fbc6295d49 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -608,8 +608,14 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) return; } - if (!(mask & MASK_CONTROL) || !mMultipleSelection) resetSelection(); - selectItemPair(item_pair, select_item); + //no need to do additional commit on selection reset + if (!(mask & MASK_CONTROL) || !mMultipleSelection) resetSelection(true); + + //only CTRL usage allows to deselect an item, usual clicking on an item cannot deselect it + if (mask & MASK_CONTROL) + selectItemPair(item_pair, select_item); + else + selectItemPair(item_pair, true); } void LLFlatListView::onItemRightMouseClick(item_pair_t* item_pair, MASK mask) -- cgit v1.2.3