From 29fb2a8699f55ce16da6b6c8da5d70bd9957848e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 4 Dec 2017 20:00:36 +0300 Subject: fix for processing background color in tabSRMM chats --- plugins/TabSRMM/src/msgdlgutils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/TabSRMM/src') diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index ac025d40e1..920bf14be9 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -902,8 +902,11 @@ BOOL CTabBaseDlg::DoRtfToTags(CMStringW &pszText) const if (isChat()) { if (mi && mi->bBkgColor) { int iInd = RtfColorToIndex(iNumColors, pIndex, _wtoi(p + 10)); - if (iInd >= 0) - res.AppendFormat(L"%%f%u", iInd); + if (iInd >= 0) { + // if the entry field is empty & the color passed is the back color, skip it + if (!(res.IsEmpty() && m_pContainer->theme.inputbg == pColors[iInd])) + res.AppendFormat(L"%%f%u", iInd); + } else if (!res.IsEmpty()) res.AppendFormat(L"%%F"); } -- cgit v1.2.3