diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index d9b8ac164b..fd56aa1976 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -46,6 +46,7 @@ #include "lltextbox.h" #include "lltrans.h" #include "fscommon.h" +#include "llviewerwindow.h" // Multi item properties floater ///---------------------------------------------------------------------------- /// LLPanelMarketplaceListings @@ -996,3 +997,22 @@ void LLFloaterItemProperties::onOpen(const LLSD& key) } } +// Multi item properties floater +LLMultiItemProperties::LLMultiItemProperties(const LLSD& key) + : LLMultiFloater(LLSD()) +{ + // start with a small rect in the top-left corner ; will get resized + LLRect rect; + rect.setLeftTopAndSize(0, gViewerWindow->getWindowHeightScaled(), 350, 350); + setRect(rect); + LLFloater* last_floater = LLFloaterReg::getLastFloaterInGroup(key.asString()); + if (last_floater) + { + stackWith(*last_floater); + } + setTitle(LLTrans::getString("MultiPropertiesTitle")); + buildTabContainer(); + // Center multifloater on screen + center(); +} +// diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index f7a738822b..0829c26291 100644 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -34,6 +34,7 @@ #include "llnotificationptr.h" #include "llmodaldialog.h" #include "lltexteditor.h" +#include "llmultifloater.h" // Multi item properties floater class LLInventoryCategoriesObserver; class LLInventoryCategoryAddedObserver; @@ -227,4 +228,12 @@ public: private: }; +// Multi item properties floater +class LLMultiItemProperties : public LLMultiFloater +{ +public: + LLMultiItemProperties(const LLSD& key); +}; +// + #endif // LL_LLFLOATERMARKETPLACELISTINGS_H diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 07d2120247..223385571c 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -99,6 +99,7 @@ #include "aoengine.h" #include "fsfloaterwearablefavorites.h" #include "fslslbridge.h" +#include "llfloatermarketplacelistings.h" #include "llfloaterproperties.h" BOOL LLInventoryState::sWearNewClothing = FALSE; @@ -2842,6 +2843,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root LLMultiPreview* multi_previewp = NULL; LLMultiProperties* multi_propertiesp = NULL; // Keep legacy properties floater + LLMultiItemProperties* multi_itempropertiesp = nullptr; // Multi item properties floater if (("task_open" == action || "open" == action) && selected_items.size() > 1) { @@ -2878,9 +2880,18 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root // Keep legacy properties floater //// Isn't supported (previously used LLMultiProperties) //LL_WARNS() << "Tried to open properties for multiple items" << LL_ENDL; - multi_propertiesp = new LLMultiProperties(); - gFloaterView->addChild(multi_propertiesp); - LLFloater::setFloaterHost(multi_propertiesp); + if (gSavedSettings.getBOOL("FSUseLegacyObjectProperties")) + { + multi_propertiesp = new LLMultiProperties(); + gFloaterView->addChild(multi_propertiesp); + LLFloater::setFloaterHost(multi_propertiesp); + } + else + { + multi_itempropertiesp = new LLMultiItemProperties("item_properties"); + gFloaterView->addChild(multi_itempropertiesp); + LLFloater::setFloaterHost(multi_itempropertiesp); + } // } @@ -3065,6 +3076,10 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { multi_propertiesp->openFloater(LLSD()); } + else if (multi_itempropertiesp) + { + multi_itempropertiesp->openFloater(LLSD()); + } // }