diff options
author | andreykproductengine <akleshchev@productengine.com> | 2015-08-18 18:51:38 +0300 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2015-08-18 18:51:38 +0300 |
commit | b3916451c178fe62775b9ba9e5a66da21f5ac2b8 (patch) | |
tree | 63b838b31f0e2f5a9d8f7ad6e70eee4174288a34 /indra/newview/llselectmgr.cpp | |
parent | fe89d4c5c2f5779d43d41760600e14925e517b3d (diff) | |
parent | 1be63209331d509396bd7ee79302d511fe83d72e (diff) |
Merge viewer-release and become version 3.8.4
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 |