diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-12-18 13:10:38 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-12-18 13:10:38 -0500 |
commit | 74f0f4dac0c31201a7c26ec1b6d645de5c8d288d (patch) | |
tree | f123606692d4f624ea2368a2fdd5b709b412cfd3 /indra/newview | |
parent | ad6d0e3bb766c737b1e9bbd9d006391cc8bcc085 (diff) |
EXT-3575 : Inernal selection spam when nothing selected in some folders
Default selection will no longer try to select hidden folders.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfolderview.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llpaneloutfitsinventory.cpp | 2 |
3 files changed, 19 insertions, 7 deletions
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index 98fae1c2a0..8b05f8614d 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -330,8 +330,8 @@ BOOL LLFolderView::addFolder( LLFolderViewFolder* folder) else { mFolders.insert(mFolders.begin(), folder); - folder->setShowLoadStatus(true); } + folder->setShowLoadStatus(true); folder->setOrigin(0, 0); folder->reshape(getRect().getWidth(), 0); folder->setVisible(FALSE); @@ -774,7 +774,7 @@ void LLFolderView::sanitizeSelection() parent_folder; parent_folder = parent_folder->getParentFolder()) { - if (parent_folder->potentiallyVisible()) + if (parent_folder->potentiallyVisible() && !parent_folder->getDontShowInHierarchy()) { // give initial selection to first ancestor folder that potentially passes the filter if (!new_selection) @@ -795,6 +795,11 @@ void LLFolderView::sanitizeSelection() { // nothing selected to start with, so pick "My Inventory" as best guess new_selection = getItemByID(gInventory.getRootFolderID()); + // ... except if it's hidden from the UI. + if (new_selection && new_selection->getDontShowInHierarchy()) + { + new_selection = NULL; + } } if (new_selection) diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 9ae0c9100a..a6be866bb3 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -969,19 +969,24 @@ void LLFolderViewItem::draw() } + font->renderUTF8( mLabel, 0, text_left, y, color, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); + text_left = right_x; + if ( (mIsLoading && mTimeSinceRequestStart.getElapsedTimeF32() >= gSavedSettings.getF32("FolderLoadingMessageWaitTime")) || (LLInventoryModel::backgroundFetchActive() && mShowLoadStatus) ) { - std::string load_string = LLTrans::getString("LoadingData") + " "; + std::string load_string = " ( " + LLTrans::getString("LoadingData") + " ) "; font->renderUTF8(load_string, 0, text_left, y, sSearchStatusColor, LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, &right_x, FALSE); text_left = right_x; } - font->renderUTF8( mLabel, 0, text_left, y, color, - LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, - S32_MAX, getRect().getWidth() - (S32) text_left, &right_x, TRUE); - + font->renderUTF8( "BLAH BLAH ", 0, right_x, y, sSuffixColor, + LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, + S32_MAX, S32_MAX, &right_x, FALSE ); + if (!mLabelSuffix.empty()) { font->renderUTF8( mLabelSuffix, 0, right_x, y, sSuffixColor, diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp index f9777147b7..8e14074de1 100644 --- a/indra/newview/llpaneloutfitsinventory.cpp +++ b/indra/newview/llpaneloutfitsinventory.cpp @@ -80,6 +80,7 @@ BOOL LLPanelOutfitsInventory::postBuild() sShowDebugEditor = gSavedSettings.getBOOL("ShowDebugAppearanceEditor"); initTabPanels(); initListCommandsHandlers(); + return TRUE; } @@ -431,6 +432,7 @@ void LLPanelOutfitsInventory::initTabPanels() mTabPanels[0] = myoutfits_panel; mActivePanel = myoutfits_panel; + LLInventoryPanel *cof_panel = getChild<LLInventoryPanel>("cof_accordionpanel"); cof_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); mTabPanels[1] = cof_panel; |