From 4ec4bf3711757c71ea9007ed939efb17312fe0b6 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 13 Oct 2015 14:53:07 +0300 Subject: MAINT-5730 FIXED Text overlapping in group invites with non-default group role --- indra/newview/llnotificationlistitem.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview') 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 LLNotificationListItem::LLNotificationListItem(const Params& p) : LLPanel(p), mParams(p), @@ -285,6 +286,16 @@ BOOL LLGroupInviteNotificationListItem::postBuild() mDeclineBtn = getChild("decline_btn"); mInfoBtn = getChild("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 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)); -- cgit v1.2.3