diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llinventorypanel.cpp | 12 | ||||
-rwxr-xr-x | indra/newview/llinventorypanel.h | 4 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/panel_marketplace_listings.xml | 4 |
3 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index b386daa77b..4bfac96a11 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -787,6 +787,18 @@ LLFolderViewItem* LLInventoryPanel::buildNewViews(const LLUUID& id) const LLUUID &parent_id = objectp->getParentUUID(); LLFolderViewFolder* parent_folder = (LLFolderViewFolder*)getItemByID(parent_id); + // Force the creation of an extra root level folder item if required by the inventory panel (default is "false") + if (mParams.show_root_folder) + { + LLUUID root_id = getRootFolderID(); + if (root_id == id) + { + // We insert an extra level that's seen by the UI but has no influence on the model + parent_folder = dynamic_cast<LLFolderViewFolder*>(folder_view_item); + folder_view_item = NULL; + } + } + if (!folder_view_item && parent_folder) { if (objectp->getType() <= LLAssetType::AT_NONE || diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 91c3efd8f0..e0b39caa6e 100755 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -96,6 +96,7 @@ public: Optional<StartFolder> start_folder; Optional<bool> use_label_suffix; Optional<bool> show_empty_message; + Optional<bool> show_root_folder; Optional<LLScrollContainer::Params> scroll; Optional<bool> accepts_drag_and_drop; Optional<LLFolderView::Params> folder_view; @@ -110,7 +111,8 @@ public: filter("filter"), start_folder("start_folder"), use_label_suffix("use_label_suffix", true), - show_empty_message("show_empty_message", true), + show_empty_message("show_empty_message", true), + show_root_folder("show_root_folder", false), scroll("scroll"), accepts_drag_and_drop("accepts_drag_and_drop"), folder_view("folder_view"), diff --git a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml index 18baa91acb..3d75ad4488 100755 --- a/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml +++ b/indra/newview/skins/default/xui/en/panel_marketplace_listings.xml @@ -87,6 +87,7 @@ start_folder.name="Marketplace listings" show_empty_message="false" show_load_status="false" + show_root_folder="true" start_folder.type="merchant" tool_tip="Drag and drop items here to sell them" bg_opaque_color="DkGray2" @@ -109,6 +110,7 @@ start_folder.name="Marketplace listings" show_empty_message="false" show_load_status="false" + show_root_folder="true" start_folder.type="merchant" bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" @@ -130,6 +132,7 @@ start_folder.name="Marketplace listings" show_empty_message="false" show_load_status="false" + show_root_folder="true" start_folder.type="merchant" bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" @@ -151,6 +154,7 @@ start_folder.name="Marketplace listings" show_empty_message="false" show_load_status="false" + show_root_folder="true" start_folder.type="merchant" bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" |