summaryrefslogtreecommitdiff
path: root/indra/llui/llscrolllistctrl.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-02-01 22:10:40 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-02-01 22:10:40 +0000
commit485c7ee0e2ebc2223c35fbb59a569ed889a1193c (patch)
tree35f827e55eecf91dab0a1c701a5645c0edf3335f /indra/llui/llscrolllistctrl.cpp
parentb302f15deea0f4f7f5de75bfd3776c17021b6444 (diff)
merge Branch_1-19-0-Viewer -r 78432:78989 -> release
QA'd in QAR-186: DEV-9179: Commit translated and reviewed strings from 1.19 frozen branch pull DEV-8792 Place information teleport button hidden behind chat bar. DEV-9374: Remove "New Account..." and "Preferences" buttons from login screen for 1.19.0 DEV-9411 -- Update required version of Quicktime library to 7.4 for 1.19.0 Viewer DEV-9430 Viewer auth failed login screen is shown in the loginxui 1.19 viewer on failure to retrieve normal login screen - changed wording of error page DEV-8537 Chat console appearing underneath status buttons DEV-9283 Chatbar cant be open while in mouselook DEV-9226 Some Dazzle? icons have sneaked into the release branch DEV-9520 Menus and Other items minimise behind onscreen buttons DEV-9521 Unable to ctrl and click to select in the friends list DEV-9530 SEC-20 Exploit to force users to teleport to a location on profile open. DEV-6833 - Mature events icon and checkbox is missing from map legend Also: Added vc9 project files (+ minor changes for vc9) (steve) Modified vc project files to not include the path for flex / bison (steve) Added marker file deletion to crash logger to stop double reporting. (cube)
Diffstat (limited to 'indra/llui/llscrolllistctrl.cpp')
-rw-r--r--indra/llui/llscrolllistctrl.cpp51
1 files changed, 28 insertions, 23 deletions
diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp
index d6be3d045f..c29789e083 100644
--- a/indra/llui/llscrolllistctrl.cpp
+++ b/indra/llui/llscrolllistctrl.cpp
@@ -1669,7 +1669,7 @@ void LLScrollListCtrl::drawItems()
{
// Draw background of selected item
bg_color = mBgSelectedColor;
- fg_color = mFgSelectedColor;
+ fg_color = (item->getEnabled() ? mFgSelectedColor : mFgDisabledColor);
}
else if (mHighlightedItem == line && mCanSelect)
{
@@ -1979,33 +1979,38 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
LLScrollListCell* hit_cell = hit_item->getColumn(column_index);
if (!hit_cell) return FALSE;
- // select item (thus deselecting any currently selected item)
- // only if item is not already selected
- if (!hit_item->getSelected())
- {
- selectItemAt(x, y, mask);
- gFocusMgr.setMouseCapture(this);
- mNeedsScroll = TRUE;
- }
-
+ // if cell handled click directly (i.e. clicked on an embedded checkbox)
if (hit_cell->handleClick())
{
- // propagate value of this cell to other selected items
- // and commit the respective widgets
- LLSD item_value = hit_cell->getValue();
- for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++)
+ // if item not currently selected, select it
+ if (!hit_item->getSelected())
{
- LLScrollListItem* item = *iter;
- if (item->getSelected())
+ selectItemAt(x, y, mask);
+ gFocusMgr.setMouseCapture(this);
+ mNeedsScroll = TRUE;
+ }
+ // otherwise we already have this item selected
+ // so propagate state of cell to rest of selected column
+ else
+ {
+ // propagate value of this cell to other selected items
+ // and commit the respective widgets
+ LLSD item_value = hit_cell->getValue();
+ for (item_list::iterator iter = mItemList.begin(); iter != mItemList.end(); iter++)
{
- LLScrollListCell* cellp = item->getColumn(column_index);
- cellp->setValue(item_value);
- cellp->onCommit();
+ LLScrollListItem* item = *iter;
+ if (item->getSelected())
+ {
+ LLScrollListCell* cellp = item->getColumn(column_index);
+ cellp->setValue(item_value);
+ cellp->onCommit();
+ }
}
+ //FIXME: find a better way to signal cell changes
+ onCommit();
}
- //FIXME: find a better way to signal cell changes
- onCommit();
- return TRUE;
+ // eat click (e.g. do not trigger double click callback)
+ return TRUE;
}
else
{
@@ -2013,7 +2018,7 @@ BOOL LLScrollListCtrl::handleClick(S32 x, S32 y, MASK mask)
selectItemAt(x, y, mask);
gFocusMgr.setMouseCapture(this);
mNeedsScroll = TRUE;
- // do not stop click processing (click callback, etc)
+ // do not eat click (allow double click callback)
return FALSE;
}
}