From 4ec4bf3711757c71ea9007ed939efb17312fe0b6 Mon Sep 17 00:00:00 2001
From: Mnikolenko ProductEngine <mnikolenko@productengine.com>
Date: Tue, 13 Oct 2015 14:53:07 +0300
Subject: [PATCH] MAINT-5730 FIXED Text overlapping in group invites with
 non-default group role

---
 indra/newview/llnotificationlistitem.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp
index f0159149d1..8cdc2d7c0b 100644
--- a/indra/newview/llnotificationlistitem.cpp
+++ b/indra/newview/llnotificationlistitem.cpp
@@ -38,6 +38,7 @@
 #include "lluicolortable.h"
 #include "message.h"
 #include "llnotificationsutil.h"
+#include <boost/regex.hpp>
 
 LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p),
     mParams(p),
@@ -285,6 +286,16 @@ BOOL LLGroupInviteNotificationListItem::postBuild()
     mDeclineBtn = getChild<LLButton>("decline_btn");
     mInfoBtn = getChild<LLButton>("info_btn");
 
+    //invitation with any non-default group role, doesn't have newline characters at the end unlike simple invitations
+    std::string invitation_desc = mNoticeTextExp->getValue().asString();
+    boost::regex pattern = boost::regex("\n\n$", boost::regex::perl|boost::regex::icase);
+    boost::match_results<std::string::const_iterator> matches;
+    if(!boost::regex_search(invitation_desc, matches, pattern))
+    {
+        invitation_desc += "\n\n";
+        mNoticeTextExp->setValue(invitation_desc);
+    }
+
     mJoinBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickJoinBtn,this));
     mDeclineBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickDeclineBtn,this));
     mInfoBtn->setClickedCallback(boost::bind(&LLGroupInviteNotificationListItem::onClickInfoBtn,this));
-- 
GitLab