diff options
Diffstat (limited to 'indra/newview/lloutfitgallery.cpp')
-rw-r--r-- | indra/newview/lloutfitgallery.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index 60724ef3d0..2728e5da03 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -69,6 +69,7 @@ LLOutfitGallery::LLOutfitGallery(const LLOutfitGallery::Params& p) mOutfitsObserver(NULL), mScrollPanel(NULL), mGalleryPanel(NULL), + mLastRowPanel(NULL), mGalleryCreated(false), mRowCount(0), mItemsAddedCount(0), @@ -168,9 +169,7 @@ bool compareGalleryItem(LLOutfitGalleryItem* item1, LLOutfitGalleryItem* item2) std::string name1 = item1->getItemName(); std::string name2 = item2->getItemName(); - LLStringUtil::toUpper(name1); - LLStringUtil::toUpper(name2); - return name1 < name2; + return (LLStringUtil::compareDict(name1, name2) < 0); } else { @@ -243,7 +242,15 @@ void LLOutfitGallery::removeLastRow() mGalleryPanel->removeChild(mLastRowPanel); mUnusedRowPanels.push_back(mLastRowPanel); mRowPanels.pop_back(); - mLastRowPanel = mRowPanels.back(); + if (mRowPanels.size() > 0) + { + // Just removed last row + mLastRowPanel = mRowPanels.back(); + } + else + { + mLastRowPanel = NULL; + } } LLPanel* LLOutfitGallery::addToRow(LLPanel* row_stack, LLOutfitGalleryItem* item, int pos, int hgap) @@ -1113,7 +1120,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id) } } - if (mGalleryCreated && !LLApp::isQuitting()) + if (mGalleryCreated && !LLApp::isExiting()) { reArrangeRows(); } |