From a555f635da29262a543ec2828a311e3f98a8ebdb Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 6 Jan 2015 18:20:42 +0200
Subject: [PATCH] MAINT-729 FIXED Hide popup menu (which belongs to old
 chiclet) when new chiclet arrives.

---
 indra/newview/llchiclet.cpp       | 8 ++++++++
 indra/newview/llchiclet.h         | 2 ++
 indra/newview/llscriptfloater.cpp | 1 +
 3 files changed, 11 insertions(+)

diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index c0823182c04..46b7679915b 100755
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -376,6 +376,14 @@ BOOL LLIMChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask)
 	return TRUE;
 }
 
+void LLIMChiclet::hidePopupMenu()
+{
+	if (mPopupMenu)
+	{
+		mPopupMenu->setVisible(FALSE);
+	}
+}
+
 bool LLIMChiclet::canCreateMenu()
 {
 	if(mPopupMenu)
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index d5e3a55fdf6..9201c6bc008 100755
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -305,6 +305,8 @@ class LLIMChiclet : public LLChiclet
 	 */
 	virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
 
+	void hidePopupMenu();
+
 protected:
 
 	LLIMChiclet(const LLIMChiclet::Params& p);
diff --git a/indra/newview/llscriptfloater.cpp b/indra/newview/llscriptfloater.cpp
index 590a1c2647d..1d021ec28fa 100755
--- a/indra/newview/llscriptfloater.cpp
+++ b/indra/newview/llscriptfloater.cpp
@@ -378,6 +378,7 @@ void LLScriptFloaterManager::onAddNotification(const LLUUID& notification_id)
 				{
 					// Pass the new_message icon state further.
 					set_new_message = chicletp->getShowNewMessagesIcon();
+					chicletp->hidePopupMenu();
 				}
 			}
 
-- 
GitLab