summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-10-13 14:53:07 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-10-13 14:53:07 +0300
commit4ec4bf3711757c71ea9007ed939efb17312fe0b6 (patch)
treeb29940ac789dc9669cd4bc2fc30bb3015756c4e1 /indra
parentc9c17b3c3c87f34b746fa751a5bbb4d0731ebac0 (diff)
MAINT-5730 FIXED Text overlapping in group invites with non-default group role
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llnotificationlistitem.cpp11
1 files changed, 11 insertions, 0 deletions
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));