From ddc9815e2f7a2bd077cdae149a4e95a45de2f9f6 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sun, 1 Mar 2009 04:33:54 -0700 Subject: Backported fix for SVC-2771 (script resetting can fail) from 1.22 --- linden/indra/newview/llcompilequeue.cpp | 16 +++++++++++++++- linden/indra/newview/llviewermenu.cpp | 5 +++-- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llcompilequeue.cpp b/linden/indra/newview/llcompilequeue.cpp index fc2742f..b4f1a22 100644 --- a/linden/indra/newview/llcompilequeue.cpp +++ b/linden/indra/newview/llcompilequeue.cpp @@ -59,6 +59,7 @@ #include "llfloaterchat.h" #include "llviewerstats.h" #include "lluictrlfactory.h" +#include "llselectmgr.h" ///---------------------------------------------------------------------------- /// Local function declarations, constants, enums, and typedefs @@ -194,7 +195,20 @@ BOOL LLFloaterScriptQueue::start() { //llinfos << "LLFloaterCompileQueue::start()" << llendl; std::string buffer; - buffer = llformat("Starting %s of %d items.", mStartString.c_str(), mObjectIDs.count()); // *TODO: Translate + + LLSelectMgr *mgr = LLSelectMgr::getInstance(); + LLObjectSelectionHandle selectHandle = mgr->getSelection(); + U32 n_objects = 0; + if (gSavedSettings.getBOOL("EditLinkedParts")) + { + n_objects = selectHandle->getObjectCount(); + } + else + { + n_objects = selectHandle->getRootObjectCount(); + } + + buffer = llformat("Starting %s of %d items.", mStartString.c_str(), n_objects); // *TODO: Translate LLScrollListCtrl* list = getChild("queue output"); list->addCommentText(buffer); diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 31fdcc3..486e4f1 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -5963,8 +5963,9 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, cons { // Apply until an object fails QueueObjects func(q); - const bool firstonly = true; - bool fail = LLSelectMgr::getInstance()->getSelection()->applyToObjects(&func, firstonly); + LLSelectMgr *mgr = LLSelectMgr::getInstance(); + LLObjectSelectionHandle selectHandle = mgr->getSelection(); + bool fail = selectHandle->applyToObjects(&func); if(fail) { if ( !func.scripted ) -- cgit v1.1