diff options
| author | akleshchev <117672381+akleshchev@users.noreply.github.com> | 2023-02-14 17:23:16 +0200 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-14 17:23:16 +0200 | 
| commit | 12c40ccabfc937a71d4d15d59cf047e9d22ae9f2 (patch) | |
| tree | f47d880adc1535caf3ab6f6fd2feb0a34b82c80c | |
| parent | e145a829bb2099e4c40342cf4c7a15cd9344c56f (diff) | |
| parent | 90b272680e5e8d9781e135a07aa36f39a8427206 (diff) | |
SL-19140 Merge pull request #81 from Ansariel/DRTVWR-567
Add multi item properties floater support
| -rw-r--r-- | indra/newview/llfloatermarketplacelistings.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llfloatermarketplacelistings.h | 7 | ||||
| -rw-r--r-- | indra/newview/llinventorybridge.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 10 | 
4 files changed, 31 insertions, 8 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index 56cdd3446f..58bd4bc82b 100644 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -45,6 +45,7 @@  #include "lltabcontainer.h"  #include "lltextbox.h"  #include "lltrans.h" +#include "llviewerwindow.h"  ///----------------------------------------------------------------------------  /// LLPanelMarketplaceListings @@ -982,3 +983,18 @@ void LLFloaterItemProperties::onOpen(const LLSD& key)      }  } +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(); +} diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h index ffc098e28a..77e855fd2a 100644 --- a/indra/newview/llfloatermarketplacelistings.h +++ b/indra/newview/llfloatermarketplacelistings.h @@ -33,6 +33,7 @@  #include "llinventorypanel.h"  #include "llnotificationptr.h"  #include "llmodaldialog.h" +#include "llmultifloater.h"  #include "lltexteditor.h"  class LLInventoryCategoriesObserver; @@ -223,4 +224,10 @@ public:  private:  }; +class LLMultiItemProperties : public LLMultiFloater +{ +public: +	LLMultiItemProperties(const LLSD& key); +}; +  #endif // LL_LLFLOATERMARKETPLACELISTINGS_H diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2dd5d12ee6..81db0c45c2 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -921,12 +921,6 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,  	addDeleteContextMenuOptions(items, disabled_items); -	// If multiple items are selected, disable properties (if it exists). -	if ((flags & FIRST_SELECTED_ITEM) == 0) -	{ -		disabled_items.push_back(std::string("Properties")); -	} -  	LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE);  	if (active_panel && (active_panel->getName() != "All Items"))  	{ diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index c3c8945556..38f79620bb 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2561,6 +2561,7 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root  	LLMultiPreview* multi_previewp = NULL; +	LLMultiItemProperties* multi_itempropertiesp = nullptr;  	if (("task_open" == action  || "open" == action) && selected_items.size() > 1)  	{ @@ -2594,8 +2595,9 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root  	}  	else if (("task_properties" == action || "properties" == action) && selected_items.size() > 1)  	{ -        // Isn't supported (previously used LLMultiProperties) -        LL_WARNS() << "Tried to open properties for multiple items" << LL_ENDL; +		multi_itempropertiesp = new LLMultiItemProperties("item_properties"); +		gFloaterView->addChild(multi_itempropertiesp); +		LLFloater::setFloaterHost(multi_itempropertiesp);  	}  	std::set<LLUUID> selected_uuid_set = LLAvatarActions::getInventorySelectedUUIDs(); @@ -2768,6 +2770,10 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root  	{  		multi_previewp->openFloater(LLSD());  	} +	else if (multi_itempropertiesp) +	{ +		multi_itempropertiesp->openFloater(LLSD()); +	}  }  void LLInventoryAction::saveMultipleTextures(const std::vector<std::string>& filenames, std::set<LLFolderViewItem*> selected_items, LLInventoryModel* model)  | 
