diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-04-04 16:38:53 +0300 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-04-04 16:38:53 +0300 |
commit | 58092382269eb8dc48fb30734ee3738f7385f8da (patch) | |
tree | 95bda2ad3033f782ceb991934439efcdd9eeae45 /indra/llui | |
parent | 7ccfbd7c285cc2ab0bbf569912f8e9e2d5c1df72 (diff) |
SL-19273 Show empty folder message for empty folders regardless of filter state
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfolderview.cpp | 2 | ||||
-rw-r--r-- | indra/llui/llfolderviewmodel.cpp | 4 | ||||
-rw-r--r-- | indra/llui/llfolderviewmodel.h | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/indra/llui/llfolderview.cpp b/indra/llui/llfolderview.cpp index 46a7057240..734a7599aa 100644 --- a/indra/llui/llfolderview.cpp +++ b/indra/llui/llfolderview.cpp @@ -665,7 +665,7 @@ void LLFolderView::draw() } else if (mShowEmptyMessage) { - mStatusTextBox->setValue(getFolderViewModel()->getStatusText()); + mStatusTextBox->setValue(getFolderViewModel()->getStatusText(mItems.empty() && mFolders.empty())); mStatusTextBox->setVisible( TRUE ); // firstly reshape message textbox with current size. This is necessary to diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index 93122503d1..f217b743a0 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -34,7 +34,7 @@ bool LLFolderViewModelCommon::needsSort(LLFolderViewModelItem* item) return item->getSortVersion() < mTargetSortVersion; } -std::string LLFolderViewModelCommon::getStatusText() +std::string LLFolderViewModelCommon::getStatusText(bool is_empty_folder) { if (!contentsReady() || mFolderView->getViewModelItem()->getLastFilterGeneration() < getFilter().getCurrentGeneration()) { @@ -42,7 +42,7 @@ std::string LLFolderViewModelCommon::getStatusText() } else { - return getFilter().getEmptyLookupMessage(); + return getFilter().getEmptyLookupMessage(is_empty_folder); } } diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index b5a765fab3..551a60e097 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -69,7 +69,7 @@ public: virtual bool checkFolder(const LLFolderViewModelItem* folder) const = 0; virtual void setEmptyLookupMessage(const std::string& message) = 0; - virtual std::string getEmptyLookupMessage() const = 0; + virtual std::string getEmptyLookupMessage(bool is_empty_folder = false) const = 0; virtual bool showAllResults() const = 0; @@ -125,7 +125,7 @@ public: virtual void setFolderView(LLFolderView* folder_view) = 0; virtual LLFolderViewFilter& getFilter() = 0; virtual const LLFolderViewFilter& getFilter() const = 0; - virtual std::string getStatusText() = 0; + virtual std::string getStatusText(bool is_empty_folder = false) = 0; virtual bool startDrag(std::vector<LLFolderViewModelItem*>& items) = 0; }; @@ -394,7 +394,7 @@ public: // sort everything mTargetSortVersion++; } - virtual std::string getStatusText(); + virtual std::string getStatusText(bool is_empty_folder = false); virtual void filter(); void setFolderView(LLFolderView* folder_view) { mFolderView = folder_view;} |