diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-04-17 02:56:14 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-04-17 02:56:14 +0000 |
commit | a3f3ab7e113e44309461b26399d627814f0ce4f9 (patch) | |
tree | 695b2a41f8d31330634ef59e7d6ece526242fd86 /indra/llui | |
parent | d85247e63e5ff0b488211b62429a4895b48dee27 (diff) |
QAR-449 Viewer 1.20 RC 1
merge Branch_1-20-Viewer -r 84432 : 84760 -> release
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llcombobox.cpp | 2 | ||||
-rw-r--r-- | indra/llui/lllineeditor.h | 2 | ||||
-rw-r--r-- | indra/llui/llscrolllistctrl.cpp | 29 |
3 files changed, 11 insertions, 22 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp index 0e8239cabd..3dd99a4636 100644 --- a/indra/llui/llcombobox.cpp +++ b/indra/llui/llcombobox.cpp @@ -749,7 +749,7 @@ BOOL LLComboBox::handleToolTip(S32 x, S32 y, LLString& msg, LLRect* sticky_rect_ tool_tip = getToolTip(); if (tool_tip.empty()) { - tool_tip = getValue().asString(); + tool_tip = getSelectedItemLabel(); } } diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h index 687e98e377..f5d7ecd4c4 100644 --- a/indra/llui/lllineeditor.h +++ b/indra/llui/lllineeditor.h @@ -305,7 +305,7 @@ protected: private: // Utility on top of LLUI::getUIImage, looks up a named image in a given XML node and returns it if possible // or returns a given default image if anything in the process fails. - static LLPointer<LLUIImage> LLLineEditor::parseImage(LLString name, LLXMLNodePtr from, LLPointer<LLUIImage> def); + static LLPointer<LLUIImage> parseImage(LLString name, LLXMLNodePtr from, LLPointer<LLUIImage> def); // Global instance used as default for member instance below. static LLPointer<LLUIImage> sImage; // Instances that by default point to the statics but can be overidden in XML. diff --git a/indra/llui/llscrolllistctrl.cpp b/indra/llui/llscrolllistctrl.cpp index 87929b10b4..eb244a6f82 100644 --- a/indra/llui/llscrolllistctrl.cpp +++ b/indra/llui/llscrolllistctrl.cpp @@ -69,37 +69,26 @@ struct SortScrollListItem bool operator()(const LLScrollListItem* i1, const LLScrollListItem* i2) { - if ( mSortOrders.empty() ) return true; - - const LLScrollListCell *cell1 = NULL; - const LLScrollListCell *cell2 = NULL; - - sort_order_t::const_reverse_iterator end_it = mSortOrders.rend(); - sort_order_t::const_reverse_iterator it; + if ( mSortOrders.empty() ) + return i1 < i2; // sort over all columns in order specified by mSortOrders S32 sort_result = 0; - for (it = mSortOrders.rbegin(); it != end_it; ++it) + for (sort_order_t::const_reverse_iterator it = mSortOrders.rbegin(); + it != mSortOrders.rend(); ++it) { S32 col_idx = it->first; BOOL sort_ascending = it->second; - cell1 = i1->getColumn(col_idx); - cell2 = i2->getColumn(col_idx); - // ascending or descending sort for this column? - S32 order = 1; - if (!sort_ascending) - { - order = -1; - } - + const LLScrollListCell *cell1 = i1->getColumn(col_idx); + const LLScrollListCell *cell2 = i2->getColumn(col_idx); + S32 order = sort_ascending ? 1 : -1; // ascending or descending sort for this column? if (cell1 && cell2) { - sort_result = (order * LLString::compareDict(cell1->getValue().asString(), cell2->getValue().asString())); + sort_result = order * LLString::compareDict(cell1->getValue().asString(), cell2->getValue().asString()); if (sort_result != 0) { - // we have a sort order! - break; + break; // we have a sort order! } } } |