summaryrefslogtreecommitdiff
path: root/indra/newview/llpaneleditwearable.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2013-02-27 11:19:17 -0800
committerRichard Linden <none@none>2013-02-27 11:19:17 -0800
commit83eda3f1524a08fa6fc4fbd836c92ae95e8100bc (patch)
treeb7317c3ba90269fa0136e46f260223bd04210678 /indra/newview/llpaneleditwearable.cpp
parentdf3f6f6cacd3803748af569ad76ae1131ad1b1b9 (diff)
parent756ab4cad5908f30c29a9e86f6905745dbec616c (diff)
Automated merge with https://bitbucket.org/lindenlab/sunshine-internal
Diffstat (limited to 'indra/newview/llpaneleditwearable.cpp')
-rwxr-xr-xindra/newview/llpaneleditwearable.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 52b5481976..a49bbcd924 100755
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -52,6 +52,7 @@
#include "lltexturectrl.h"
#include "lltextureentry.h"
#include "llviewercontrol.h" // gSavedSettings
+#include "llviewerregion.h"
#include "llviewertexturelist.h"
#include "llagentcamera.h"
#include "llmorphview.h"
@@ -882,8 +883,8 @@ void LLPanelEditWearable::setWearable(LLViewerWearable *wearable, BOOL disable_c
//static
void LLPanelEditWearable::onBackButtonClicked(void* userdata)
-{
- LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata;
+{
+ LLPanelEditWearable *panel = (LLPanelEditWearable*) userdata;
if ( panel->isDirty() )
{
LLAppearanceMgr::instance().setOutfitDirty( true );
@@ -1045,6 +1046,11 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type)
}
}
+void LLPanelEditWearable::incrementCofVersionLegacy()
+{
+
+}
+
void LLPanelEditWearable::saveChanges(bool force_save_as)
{
if (!mWearablePtr || !isDirty())
@@ -1073,10 +1079,10 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
if (force_save_as)
{
- // the name of the wearable has changed, re-save wearable with new name
- LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID());
+ // the name of the wearable has changed, re-save wearable with new name
+ LLAppearanceMgr::instance().removeCOFItemLinks(mWearablePtr->getItemID());
gAgentWearables.saveWearableAs(mWearablePtr->getType(), index, new_name, description, FALSE);
- mNameEditor->setText(mWearableItem->getName());
+ mNameEditor->setText(mWearableItem->getName());
}
else
{
@@ -1096,8 +1102,18 @@ void LLPanelEditWearable::saveChanges(bool force_save_as)
// Remove old link
gInventory.purgeObject(link_item->getUUID());
}
- gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
+ gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
}
+
+ if (gAgent.getRegion() && gAgent.getRegion()->getCentralBakeVersion() > 0)
+ {
+ LLAppearanceMgr::getInstance()->incrementCofVersion();
+ }
+ else
+ {
+ // *HACK This should be removed when all regions support the IncrementCOFVersion capability.
+ incrementCofVersionLegacy();
+ }
}
void LLPanelEditWearable::revertChanges()