summaryrefslogtreecommitdiff
path: root/indra
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
commit8aec2ce3549ff0a39308d47fd3f136eaa8068639 (patch)
tree0a3d7ae58da2b556e7ac0f13796faa5a4d99b70c /indra
parenteb6153d2c3cb1e2105804e28f81f894873315545 (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
Diffstat (limited to 'indra')
-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)