summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-06-25 16:36:38 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-06-25 16:36:38 +0300
commit1845816aa2419353ace258b7cfe24bdd08357ebe (patch)
tree1973e2db379939e0bd1f66e2cf6e47151b545847
parentae89d5b4d9bbfa18f530f29f4db8c9d38bb52807 (diff)
MAINT-5299 FIXED [MAINT-RC] Unlinking individual prims from a linkset no longer works
-rwxr-xr-xindra/newview/llselectmgr.cpp20
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml2
2 files changed, 7 insertions, 15 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index cbc00d8b53..47a9353ffa 100755
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -619,22 +619,14 @@ bool LLSelectMgr::linkObjects()
bool LLSelectMgr::unlinkObjects()
{
- LLViewerObject *object = mSelectedObjects->getFirstRootObject();
- if (!object) return false;
-
S32 min_objects_for_confirm = gSavedSettings.getS32("MinObjectsForUnlinkConfirm");
- for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++)
+ S32 unlink_object_count = mSelectedObjects->getObjectCount(); // clears out nodes with NULL objects
+ if (unlink_object_count >= min_objects_for_confirm
+ && unlink_object_count > mSelectedObjects->getRootObjectCount())
{
- object = (*iter)->getObject();
- if(object)
- {
- S32 objects_in_linkset = object->numChildren() + 1;
- if(objects_in_linkset >= min_objects_for_confirm)
- {
- LLNotificationsUtil::add("ConfirmUnlink", LLSD(), LLSD(), boost::bind(&LLSelectMgr::confirmUnlinkObjects, this, _1, _2));
- return true;
- }
- }
+ // total count > root count means that there are childer inside and that there are linksets that will be unlinked
+ LLNotificationsUtil::add("ConfirmUnlink", LLSD(), LLSD(), boost::bind(&LLSelectMgr::confirmUnlinkObjects, this, _1, _2));
+ return true;
}
LLSelectMgr::getInstance()->sendDelink();
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index ba8502ba81..93469aa3f4 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5382,7 +5382,7 @@ You cannot undo this action.
name="ConfirmUnlink"
type="alertmodal">
<unique/>
- This is a large linkset. If you unlink it, you may not be able to link it again. You may wish to take a copy of the linkset into your inventory as a precaution.
+ This is a large selection with linksets. If you unlink it, you may not be able to link it again. You may wish to take copies of linksets into your inventory as a precaution.
<tag>confirm</tag>
<usetemplate
ignoretext="Confirm when unlinking a linkset"