summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-27 18:23:56 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-27 18:23:56 +0300
commit30b87c11e92f1917aec95662f95a8e5a136c937e (patch)
tree1e58f61827e189d2bf8e57d49d9e5590049c18f2
parent697d3be3c9906a6d578a961710fc43816b6adeae (diff)
SL-19583 WIP fixed the issue with item selection and restored filter handling for gallery panel
-rw-r--r--indra/newview/llpanelmaininventory.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 7cd6d7cb82..b9099bbebf 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -2217,26 +2217,31 @@ void LLPanelMainInventory::updateCombinationVisibility()
{
if(mSingleFolderMode && isCombinationViewMode())
{
- LLRect inner_rect = mCombinationInventoryPanel->getScrollableContainer()->getScrolledViewRect();
+ if (!mCombinationGalleryPanel->hasVisibleItems())
+ {
+ mCombinationGalleryPanel->handleModifiedFilter();
+ }
LLRect inv_rect = mCombinationInventoryPanel->getRect();
+ LLRect inv_inner_rect = mCombinationInventoryPanel->getScrollableContainer()->getScrolledViewRect();
+ LLRect galery_rect = mCombinationGalleryPanel->getRect();
+ LLRect inner_galery_rect = mCombinationGalleryPanel->getScrollableContainer()->getScrolledViewRect();
+
inv_rect.mBottom = 0;
- inv_rect.mRight = inv_rect.mLeft + inner_rect.getWidth();
+ inv_rect.mRight = inv_rect.mLeft + inv_inner_rect.getWidth();
if (!mCombinationGalleryPanel->hasVisibleItems() || mCombinationInventoryPanel->hasVisibleItems())
{
- inv_rect.mTop = inv_rect.mBottom + inner_rect.getHeight();
+ inv_rect.mTop = inv_rect.mBottom + inv_inner_rect.getHeight();
}
else
{
inv_rect.mTop = inv_rect.mBottom;
}
- inner_rect = mCombinationGalleryPanel->getScrollableContainer()->getScrolledViewRect();
- LLRect galery_rect = mCombinationGalleryPanel->getRect();
galery_rect.mBottom = inv_rect.mTop;
if (mCombinationGalleryPanel->hasVisibleItems())
{
mCombinationGalleryPanel->setVisible(true);
- galery_rect.mTop = galery_rect.mBottom + inner_rect.getHeight();
+ galery_rect.mTop = galery_rect.mBottom + inner_galery_rect.getHeight();
}
else
{
@@ -2244,16 +2249,9 @@ void LLPanelMainInventory::updateCombinationVisibility()
galery_rect.mTop = galery_rect.mBottom;
}
- LLRect scroller_rect = mCombinationScroller->getRect();
- scroller_rect.mBottom = 0;
- scroller_rect.mTop = scroller_rect.mBottom + inv_rect.getHeight() + galery_rect.getHeight();
- scroller_rect.mRight = scroller_rect.mLeft + llmax(inv_rect.getWidth(), galery_rect.getWidth());
-
- mCombinationScroller->setRect(scroller_rect);
+ mCombinationScroller->reshape(llmax(inv_rect.getWidth(), galery_rect.getWidth()), inv_rect.getHeight() + galery_rect.getHeight(), true);
mCombinationGalleryPanel->handleReshape(galery_rect, false);
mCombinationInventoryPanel->handleReshape(inv_rect, false);
-
- getActivePanel()->getRootFolder();
}
}