summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Borovkov <iborovkov@productengine.com>2010-07-13 18:43:30 +0300
committerIgor Borovkov <iborovkov@productengine.com>2010-07-13 18:43:30 +0300
commit4965f9f2d5da84d3b60ccb1bc63497fdbfa99e51 (patch)
tree0a3d7ae58da2b556e7ac0f13796faa5a4d99b70c
parent623dae525dc14a69322266e33421770431c34a66 (diff)
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
-rw-r--r--indra/llui/llflatlistview.cpp10
1 files 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)