Add multi item properties floater support
parent
c364d878b3
commit
c5a3c97b6b
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue