From c81aa53e7bd8570da82e1794a8b50eb74a3d1bee Mon Sep 17 00:00:00 2001
From: maxim_productengine <mnikolenko@productengine.com>
Date: Wed, 12 Feb 2020 17:50:49 +0200
Subject: [PATCH] SL-12695 FIXED 'New' badges are not shown for some folders
 after resizing 'Received items' panel

---
 indra/llui/llbadgeowner.cpp                        | 8 ++++++++
 indra/llui/llbadgeowner.h                          | 1 +
 indra/newview/llpanelmarketplaceinboxinventory.cpp | 6 ++++++
 3 files changed, 15 insertions(+)

diff --git a/indra/llui/llbadgeowner.cpp b/indra/llui/llbadgeowner.cpp
index 0557cd43756..5f11c383ef1 100644
--- a/indra/llui/llbadgeowner.cpp
+++ b/indra/llui/llbadgeowner.cpp
@@ -56,6 +56,14 @@ void LLBadgeOwner::initBadgeParams(const LLBadge::Params& p)
 	}
 }
 
+void LLBadgeOwner::reshapeBadge(const LLRect& new_rect)
+{
+	if (mBadge)
+	{
+		mBadge->setShape(new_rect);
+	}
+}
+
 void LLBadgeOwner::setBadgeVisibility(bool visible)
 {
 	if (mBadge)
diff --git a/indra/llui/llbadgeowner.h b/indra/llui/llbadgeowner.h
index 01ed95f3a3e..4ce208fa0d8 100644
--- a/indra/llui/llbadgeowner.h
+++ b/indra/llui/llbadgeowner.h
@@ -46,6 +46,7 @@ class LLBadgeOwner
 	bool hasBadgeHolderParent() const { return mHasBadgeHolderParent; };
 	void setBadgeVisibility(bool visible);
 	void setDrawBadgeAtTop(bool draw_at_top);
+	void reshapeBadge(const LLRect& new_rect);
 
 private:
 
diff --git a/indra/newview/llpanelmarketplaceinboxinventory.cpp b/indra/newview/llpanelmarketplaceinboxinventory.cpp
index 5508bcdd813..7a6631448b0 100644
--- a/indra/newview/llpanelmarketplaceinboxinventory.cpp
+++ b/indra/newview/llpanelmarketplaceinboxinventory.cpp
@@ -150,6 +150,12 @@ void LLInboxFolderViewFolder::draw()
 	setBadgeVisibility(mFresh);
 
 	LLFolderViewFolder::draw();
+
+	if (mFresh)
+	{
+		reshapeBadge(getRect());
+	}
+
 }
 
 BOOL LLInboxFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
-- 
GitLab