summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2014-04-07 18:36:02 +0300
committerandreykproductengine <akleshchev@productengine.com>2014-04-07 18:36:02 +0300
commit508487bdee53daf385653561fc14193dd3fc69a3 (patch)
treec0fea186d51f5a1fa85afb08463aa33cc4881c86
parent1108a34d1dc063eddf2b0e4991b6391a12686be7 (diff)
MAINT-459 FIXED Cannot delete prim displaying media
Fixed interaction with unselected faces while media is selected.
-rwxr-xr-xindra/newview/lltoolselect.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/lltoolselect.cpp b/indra/newview/lltoolselect.cpp
index 7c604a04bf..0e69cc51ac 100755
--- a/indra/newview/lltoolselect.cpp
+++ b/indra/newview/lltoolselect.cpp
@@ -35,6 +35,7 @@
#include "llmanip.h"
#include "llmenugl.h"
#include "llselectmgr.h"
+#include "llviewermediafocus.h"
#include "lltoolmgr.h"
#include "llfloaterscriptdebug.h"
#include "llviewercamera.h"
@@ -109,6 +110,21 @@ LLObjectSelectionHandle LLToolSelect::handleObjectSelection(const LLPickInfo& pi
{
BOOL already_selected = object->isSelected();
+ if (already_selected &&
+ object->getNumTEs() > 0 &&
+ !LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES))
+ {
+ const LLTextureEntry* tep = object->getTE(pick.mObjectFace);
+ if (tep && !tep->isSelected() && !LLViewerMediaFocus::getInstance()->getFocusedObjectID().isNull())
+ {
+ // we were interacting with media and clicked on non selected face, drop media focus
+ LLViewerMediaFocus::getInstance()->clearFocus();
+ // selection was removed and zoom preserved by clearFocus(), continue with regular selection
+ already_selected = false;
+ extend_select = true;
+ }
+ }
+
if ( extend_select )
{
if ( already_selected )