diff options
| author | MaximB ProductEngine <mberezhnoy@productengine.com> | 2014-01-14 10:00:30 +0200 | 
|---|---|---|
| committer | MaximB ProductEngine <mberezhnoy@productengine.com> | 2014-01-14 10:00:30 +0200 | 
| commit | 4d81b1d967fbfa68f97f37d8d162b1ac9900a4b0 (patch) | |
| tree | 901bbd3a524a2763b6744bd8f45045d717ac1654 /indra | |
| parent | c934710f766223e56c892b3ab7acd02321a8b47e (diff) | |
MAINT-3510 (Incorrect context menu entry in Places floater)
Diffstat (limited to 'indra')
| -rwxr-xr-x | indra/llui/llfolderview.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llpanellandmarks.cpp | 5 | ||||
| -rwxr-xr-x | indra/newview/llpanellandmarks.h | 2 | ||||
| -rwxr-xr-x | indra/newview/llplacesfolderview.cpp | 11 | ||||
| -rwxr-xr-x | indra/newview/llplacesfolderview.h | 2 | 
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)  | 
