summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 40c74ccf82..1bff04352c 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -62,6 +62,7 @@
#include "llfloaterreporter.h"
#include "llfloatersearch.h"
#include "llfloaterscriptdebug.h"
+#include "llfloatersnapshot.h"
#include "llfloatertools.h"
#include "llfloaterworldmap.h"
#include "llavataractions.h"
@@ -436,17 +437,7 @@ void init_menus()
gMenuBarView->setBackgroundColor( color );
gMenuHolder->addChild(gMenuBarView);
-
- // menu holder appears on top of menu bar so you can see the menu title
- // flash when an item is triggered (the flash occurs in the holder)
- gViewerWindow->getRootView()->addChild(gMenuHolder);
-
- // This removes tool tip view from main view and adds it
- // to root view in front of menu holder.
- // Otherwise tool tips for menu items would be overlapped by menu, since
- // main view is behind of menu holder now.
- gViewerWindow->getRootView()->addChild(gToolTipView);
-
+
gViewerWindow->setMenuBackgroundColor(false,
LLViewerLogin::getInstance()->isInProductionGrid());
@@ -2466,7 +2457,7 @@ class LLViewJoystickFlycam : public view_listener_t
class LLViewCheckJoystickFlycam : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
- {
+ {
bool new_value = LLViewerJoystick::getInstance()->getOverrideCamera();
return new_value;
}
@@ -3704,6 +3695,7 @@ void reset_view_final( BOOL proceed )
}
gAgent.resetView(TRUE, TRUE);
+ gAgent.setLookAt(LOOKAT_TARGET_CLEAR);
}
class LLViewLookAtLastChatter : public view_listener_t
@@ -5856,8 +5848,12 @@ void confirm_replace_attachment(S32 option, void* user_data)
}
}
-bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
+void callback_attachment_drop(const LLSD& notification, const LLSD& response)
{
+ // Ensure user confirmed the drop
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option != 0) return;
+
// Called when the user clicked on an object attached to them
// and selected "Drop".
LLUUID object_id = notification["payload"]["object_id"].asUUID();
@@ -5866,7 +5862,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
if (!object)
{
llwarns << "handle_drop_attachment() - no object to drop" << llendl;
- return true;
+ return;
}
LLViewerObject *parent = (LLViewerObject*)object->getParent();
@@ -5883,13 +5879,13 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
if (!object)
{
llwarns << "handle_detach() - no object to detach" << llendl;
- return true;
+ return;
}
if (object->isAvatar())
{
llwarns << "Trying to detach avatar from avatar." << llendl;
- return true;
+ return;
}
// reselect the object
@@ -5897,7 +5893,7 @@ bool callback_attachment_drop(const LLSD& notification, const LLSD& response)
LLSelectMgr::getInstance()->sendDropAttachment();
- return true;
+ return;
}
class LLAttachmentDrop : public view_listener_t