diff options
author | Rider Linden <rider@lindenlab.com> | 2015-08-25 11:40:36 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2015-08-25 11:40:36 -0700 |
commit | 96bb17f20bbcdc595f3a615a3129e134595b3a4a (patch) | |
tree | e51e47f79b78a076e821360763196cc72c154aad /indra/newview/llselectmgr.cpp | |
parent | 7c61728b4bae928b2461f0f933dd1c1fa34ef0aa (diff) | |
parent | 1be63209331d509396bd7ee79302d511fe83d72e (diff) |
Merge
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rwxr-xr-x | indra/newview/llselectmgr.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 69c577f445..4fafbf917b 100755 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -620,10 +620,33 @@ bool LLSelectMgr::linkObjects() bool LLSelectMgr::unlinkObjects() { + S32 min_objects_for_confirm = gSavedSettings.getS32("MinObjectsForUnlinkConfirm"); + 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()) + { + // 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(); return true; } +void LLSelectMgr::confirmUnlinkObjects(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + // if Cancel pressed + if (option == 1) + { + return; + } + + LLSelectMgr::getInstance()->sendDelink(); + return; +} + // in order to link, all objects must have the same owner, and the // agent must have the ability to modify all of the objects. However, // we're not answering that question with this method. The question |