summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llappearancemgr.h3
-rw-r--r--indra/newview/llpaneleditwearable.cpp54
-rw-r--r--indra/newview/llpaneleditwearable.h3
3 files changed, 38 insertions, 22 deletions
diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h
index 525402c215..7c94542e20 100755
--- a/indra/newview/llappearancemgr.h
+++ b/indra/newview/llappearancemgr.h
@@ -191,6 +191,9 @@ public:
void incrementCofVersion(LLHTTPClient::ResponderPtr responder_ptr = NULL);
+ // *HACK Remove this after server side texture baking is deployed on all sims.
+ void incrementCofVersionLegacy();
+
protected:
LLAppearanceMgr();
~LLAppearanceMgr();
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 3e7db06bdf..650e1809cf 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1028,33 +1028,43 @@ void LLPanelEditWearable::updatePanelPickerControls(LLWearableType::EType type)
}
}
+void LLPanelEditWearable::incrementCofVersionLegacy()
+{
+
+}
+
void LLPanelEditWearable::saveChanges(bool force_save_as)
{
- if (!mWearablePtr || !isDirty())
- {
- // do nothing if no unsaved changes
- return;
- }
+ if (!mWearablePtr || !isDirty())
+ {
+ // do nothing if no unsaved changes
+ return;
+ }
- U32 index = gAgentWearables.getWearableIndex(mWearablePtr);
+ U32 index = gAgentWearables.getWearableIndex(mWearablePtr);
- std::string new_name = mNameEditor->getText();
- if (force_save_as)
- {
- // 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, FALSE);
- mNameEditor->setText(mWearableItem->getName());
- }
- else
- {
- gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
- }
+ std::string new_name = mNameEditor->getText();
+ if (force_save_as)
+ {
+ // 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, FALSE);
+ mNameEditor->setText(mWearableItem->getName());
+ }
+ else
+ {
+ gAgentWearables.saveWearable(mWearablePtr->getType(), index, TRUE, new_name);
+ }
- if (gAgentAvatarp->isUsingServerBakes())
- {
- LLAppearanceMgr::getInstance()->incrementCofVersion();
- }
+ if (getRegion() && getRegion()->getCentralBakeVersion() > 0)
+ {
+ LLAppearanceMgr::getInstance()->incrementCofVersion();
+ }
+ else
+ {
+ // *HACK This should be removed when all regions support the IncrementCOFVersion capability.
+ incrementCofVersionLegacy();
+ }
}
void LLPanelEditWearable::revertChanges()
diff --git a/indra/newview/llpaneleditwearable.h b/indra/newview/llpaneleditwearable.h
index 50d5328a83..c5b44ecc9d 100644
--- a/indra/newview/llpaneleditwearable.h
+++ b/indra/newview/llpaneleditwearable.h
@@ -113,6 +113,9 @@ private:
void setWearablePanelVisibilityChangeCallback(LLPanel* bodypart_panel);
+ // *HACK Remove this when serverside texture baking is available on all regions.
+ void incrementCofVersionLegacy();
+
// the pointer to the wearable we're editing. NULL means we're not editing a wearable.
LLViewerWearable *mWearablePtr;
LLViewerInventoryItem* mWearableItem;