summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaximB ProductEngine <mberezhnoy@productengine.com>2014-01-14 10:00:30 +0200
committerMaximB ProductEngine <mberezhnoy@productengine.com>2014-01-14 10:00:30 +0200
commit4d81b1d967fbfa68f97f37d8d162b1ac9900a4b0 (patch)
tree901bbd3a524a2763b6744bd8f45045d717ac1654
parentc934710f766223e56c892b3ab7acd02321a8b47e (diff)
MAINT-3510 (Incorrect context menu entry in Places floater)
-rwxr-xr-xindra/llui/llfolderview.h2
-rwxr-xr-xindra/newview/llpanellandmarks.cpp5
-rwxr-xr-xindra/newview/llpanellandmarks.h2
-rwxr-xr-xindra/newview/llplacesfolderview.cpp11
-rwxr-xr-xindra/newview/llplacesfolderview.h2
5 files changed, 21 insertions, 1 deletions
diff --git a/indra/llui/llfolderview.h b/indra/llui/llfolderview.h
index 11fccdace4..c28660819f 100755
--- a/indra/llui/llfolderview.h
+++ b/indra/llui/llfolderview.h
@@ -236,7 +236,7 @@ public:
virtual S32 notify(const LLSD& info) ;
bool useLabelSuffix() { return mUseLabelSuffix; }
- void updateMenu();
+ virtual void updateMenu();
private:
void updateMenuOptions(LLMenuGL* menu);
diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 88400e4ef2..a22d9c06fa 100755
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -716,6 +716,11 @@ void LLLandmarksPanel::updateListCommands()
mListCommands->getChildView(TRASH_BUTTON_NAME)->setEnabled(trash_enabled);
}
+void LLLandmarksPanel::updateMenuVisibility(LLUICtrl* menu)
+{
+ onMenuVisibilityChange(menu, LLSD().with("visibility", true));
+}
+
void LLLandmarksPanel::onActionsButtonClick()
{
LLToggleableMenu* menu = mGearFolderMenu;
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 8fae0f0b67..80310d1524 100755
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -80,6 +80,8 @@ public:
LLPlacesInventoryPanel* getLibraryInventoryPanel() { return mLibraryInventoryPanel; }
+ void updateMenuVisibility(LLUICtrl* menu);
+
protected:
/**
* @return true - if current selected panel is not null and selected item is a landmark
diff --git a/indra/newview/llplacesfolderview.cpp b/indra/newview/llplacesfolderview.cpp
index 3caa93ae71..1cb013adc6 100755
--- a/indra/newview/llplacesfolderview.cpp
+++ b/indra/newview/llplacesfolderview.cpp
@@ -31,6 +31,7 @@
#include "llplacesinventorypanel.h"
#include "llpanellandmarks.h"
+#include "llmenugl.h"
LLPlacesFolderView::LLPlacesFolderView(const LLFolderView::Params& p)
: LLFolderView(p)
@@ -67,6 +68,16 @@ BOOL LLPlacesFolderView::handleRightMouseDown(S32 x, S32 y, MASK mask)
return LLFolderView::handleRightMouseDown(x, y, mask);
}
+void LLPlacesFolderView::updateMenu()
+{
+ LLFolderView::updateMenu();
+ LLMenuGL* menu = (LLMenuGL*)mPopupMenuHandle.get();
+ if (menu && menu->getVisible())
+ {
+ mParentLandmarksPanel->updateMenuVisibility(menu);
+ }
+}
+
void LLPlacesFolderView::setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle)
{
mMenuHandlesByInventoryType[asset_type] = menu_handle;
diff --git a/indra/newview/llplacesfolderview.h b/indra/newview/llplacesfolderview.h
index 8c5be39b5e..65fe76007a 100755
--- a/indra/newview/llplacesfolderview.h
+++ b/indra/newview/llplacesfolderview.h
@@ -51,6 +51,8 @@ public:
*/
/*virtual*/ BOOL handleRightMouseDown( S32 x, S32 y, MASK mask );
+ /*virtual*/ void updateMenu();
+
void setupMenuHandle(LLInventoryType::EType asset_type, LLHandle<LLView> menu_handle);
void setParentLandmarksPanel(LLLandmarksPanel* panel)