From d5bed7df3545f0765e6767c085f64a0a04136e7e Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 1 Jul 2010 20:00:00 +0300 Subject: EXT-7565 FIXED Would be nice to preserve selection while switching between folder/list view modes - Created callback called 'SaveSelecton' (which preserves selection while switching between folder/list view modes) for folder/list view modes buttons in LLPanelOutfitEdit. - Added 'scrollToShowFirstSelectedItem' method in the LLFlatListView which scrools and shows the first selected item in case multiselection. - It's possible to set selection for flat list view items before list is build. The result is that any items will be selected. To get rid of it: 1. Overrided LLFlatListView::selectItemByValue method in LLInventoryItemsList so that if list is not created yet, items ids are saved to the vector. 2. Added 'LLInventoryItemsList::updateSelection()' method which selects items with ids from that vector when list is created. - A little refactoring: moved funcionality of updating WearablesPanel's verb buttons to the separate method called LLPanelOutfitEdit::updateWearablesPanelVerbButtons() to made code more readable and self-explanatory Reviewed by Vadim Savchuk and Neal Orman at https://codereview.productengine.com/secondlife/r/579/ --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/llui/llflatlistview.cpp') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index b87851490d..a3debdb19a 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -776,6 +776,18 @@ bool LLFlatListView::selectItemPair(item_pair_t* item_pair, bool select) return true; } +void LLFlatListView::scrollToShowFirstSelectedItem() +{ + if (!mSelectedItemPairs.size()) return; + + LLRect selected_rc = mSelectedItemPairs.front()->first->getRect(); + + if (selected_rc.isValid()) + { + scrollToShowRect(selected_rc); + } +} + LLRect LLFlatListView::getLastSelectedItemRect() { if (!mSelectedItemPairs.size()) -- cgit v1.2.3 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(-) (limited to 'indra/llui/llflatlistview.cpp') 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 From c96caed698afb38c50db229fff35fa8b91e40f83 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 27 Jul 2010 14:44:17 -0700 Subject: Merge from dessie/viewer-release --- indra/llui/llflatlistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llui/llflatlistview.cpp') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 90c6f15d23..0fa7949be2 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -615,7 +615,7 @@ void LLFlatListView::onItemMouseClick(item_pair_t* item_pair, MASK mask) //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); + selectItemPair(item_pair, select_item); else selectItemPair(item_pair, true); } -- cgit v1.2.3 From b27c892bc560831d912d98156d904b5cd2713c66 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 17 Aug 2010 22:34:50 +0300 Subject: EXT-8357 FIXED ESC key sometimes failing to de-focus the sidebar. I've found out that the only case when pressing ESC doesn't transfer focus from side tray to game area is when a flat list view (people, groups, teleport history, etc) is focused. So, I fixed LLFlatListView to handle pressing ESC as expected. Reviewed by Sergey Litovchuk at https://codereview.productengine.com/secondlife/r/862/ --HG-- branch : product-engine --- indra/llui/llflatlistview.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llui/llflatlistview.cpp') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 70558f8eb8..8de44455de 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -669,6 +669,14 @@ BOOL LLFlatListView::handleKeyHere(KEY key, MASK mask) } break; } + case KEY_ESCAPE: + { + if (mask == MASK_NONE) + { + setFocus(FALSE); // pass focus to the game area (EXT-8357) + } + break; + } default: break; } -- cgit v1.2.3 From a5619d16f74863168f45b04b37cc6383e1a92263 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 13 Oct 2010 07:24:37 -0400 Subject: correct licenses (fix problem with license change merge) --- indra/llui/llflatlistview.cpp | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) (limited to 'indra/llui/llflatlistview.cpp') diff --git a/indra/llui/llflatlistview.cpp b/indra/llui/llflatlistview.cpp index 8de44455de..97a52fada4 100644 --- a/indra/llui/llflatlistview.cpp +++ b/indra/llui/llflatlistview.cpp @@ -2,31 +2,25 @@ * @file llflatlistview.cpp * @brief LLFlatListView base class and extension to support messages for several cases of an empty list. * - * $LicenseInfo:firstyear=2009&license=viewergpl$ - * - * Copyright (c) 2009-2010, Linden Research, Inc. - * + * $LicenseInfo:firstyear=2009&license=viewerlgpl$ * Second Life Viewer Source Code - * The source code in this file ("Source Code") is provided by Linden Lab - * to you under the terms of the GNU General Public License, version 2.0 - * ("GPL"), unless you have obtained a separate licensing agreement - * ("Other License"), formally executed by you and Linden Lab. Terms of - * the GPL can be found in doc/GPL-license.txt in this distribution, or - * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * Copyright (C) 2010, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. * - * There are special exceptions to the terms and conditions of the GPL as - * it is applied to this Source Code. View the full text of the exception - * in the file doc/FLOSS-exception.txt in this software distribution, or - * online at - * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. * - * By copying, modifying or distributing this software, you acknowledge - * that you have read and understood your obligations described above, - * and agree to abide by those obligations. + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * - * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO - * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, - * COMPLETENESS OR PERFORMANCE. + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA * $/LicenseInfo$ */ -- cgit v1.2.3