diff options
Diffstat (limited to 'indra/newview')
-rwxr-xr-x | indra/newview/llselectmgr.cpp | 20 | ||||
-rwxr-xr-x | indra/newview/skins/default/xui/en/notifications.xml | 2 |
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" |