Comment out LL object unlink as it's buggy (BUG-9499) and doesn't work properly. Simply always show the confirmation like we did before

master
Ansariel 2015-06-21 17:39:23 +02:00
parent cc72b8a747
commit 274d73ede0
1 changed files with 20 additions and 17 deletions

View File

@ -653,25 +653,28 @@ bool LLSelectMgr::linkObjects()
bool LLSelectMgr::unlinkObjects()
{
LLViewerObject *object = mSelectedObjects->getFirstRootObject();
if (!object) return false;
// <FS:Ansariel> Comment this out as it's buggy (BUG-9499) and doesn't work properly. Simply always show the confirmation like we did before
//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++)
{
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;
}
}
}
//S32 min_objects_for_confirm = gSavedSettings.getS32("MinObjectsForUnlinkConfirm");
//for (LLObjectSelection::root_iterator iter = getSelection()->root_begin(); iter != getSelection()->root_end(); iter++)
//{
// 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;
// }
// }
//}
LLSelectMgr::getInstance()->sendDelink();
//LLSelectMgr::getInstance()->sendDelink();
LLNotificationsUtil::add("ConfirmUnlink", LLSD(), LLSD(), boost::bind(&LLSelectMgr::confirmUnlinkObjects, this, _1, _2));
// </FS:Ansariel>
return true;
}