summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-19 17:09:39 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-04-19 17:09:39 +0300
commit1e4ebffa0c801b41990ab38c85ef95eb6f948cd5 (patch)
treefa0884cf4fc6ad0455db6e3f442a2a025dbbf1c7 /indra
parent97b0f637dfbd4ab2b3fe79442e9f847cf7a6efca (diff)
SL-19604 show layout panel before creating new item in combination mode, if there are no items in inventory panel
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelmaininventory.cpp17
-rw-r--r--indra/newview/llpanelmaininventory.h2
2 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 9d1e861344..d8845a7d94 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -118,6 +118,7 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p)
mNeedUploadCost(true),
mMenuViewDefault(NULL),
mSingleFolderMode(false),
+ mForceShowInvLayout(false),
mViewMode(MODE_LIST),
mListViewRootUpdatedConnection(),
mGalleryRootUpdatedConnection()
@@ -502,6 +503,13 @@ void LLPanelMainInventory::doCreate(const LLSD& userdata)
LLFolderViewItem* current_folder = getActivePanel()->getRootFolder();
if (current_folder)
{
+ if(isCombinationViewMode())
+ {
+ //show layout and inventory panel before adding the item
+ //to avoid wrong position of the 'renamer'
+ mForceShowInvLayout = true;
+ }
+
LLFolderBridge* bridge = (LLFolderBridge*)current_folder->getViewModelItem();
menu_create_inventory_item(getPanel(), bridge, userdata);
}
@@ -2198,7 +2206,7 @@ void LLPanelMainInventory::onCombinationRootChanged(bool gallery_clicked)
{
mCombinationGalleryPanel->setRootFolder(mCombinationInventoryPanel->getSingleFolderRoot());
}
-
+ mForceShowInvLayout = false;
updateTitle();
}
@@ -2207,11 +2215,14 @@ void LLPanelMainInventory::updateCombinationVisibility()
if(mSingleFolderMode && isCombinationViewMode())
{
bool is_gallery_empty = !mCombinationGalleryPanel->hasVisibleItems();
- bool show_inv_pane = mCombinationInventoryPanel->hasVisibleItems() || is_gallery_empty;
+ bool show_inv_pane = mCombinationInventoryPanel->hasVisibleItems() || is_gallery_empty || mForceShowInvLayout;
getChild<LLLayoutPanel>("comb_gallery_layout")->setVisible(!is_gallery_empty);
getChild<LLLayoutPanel>("comb_inventory_layout")->setVisible(show_inv_pane);
mCombinationInventoryPanel->getRootFolder()->setForceArrange(!show_inv_pane);
-
+ if(mCombinationInventoryPanel->hasVisibleItems())
+ {
+ mForceShowInvLayout = false;
+ }
if(is_gallery_empty)
{
mCombinationGalleryPanel->handleModifiedFilter();
diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h
index 8bc8f4e2e6..e5b9ba929d 100644
--- a/indra/newview/llpanelmaininventory.h
+++ b/indra/newview/llpanelmaininventory.h
@@ -231,6 +231,8 @@ private:
LLHandle<LLView> mMenuAddHandle;
bool mNeedUploadCost;
+
+ bool mForceShowInvLayout;
// List Commands //
////////////////////////////////////////////////////////////////////////////////
};