diff options
author | George Hazan <ghazan@miranda.im> | 2017-12-04 20:00:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-12-04 20:00:36 +0300 |
commit | 29fb2a8699f55ce16da6b6c8da5d70bd9957848e (patch) | |
tree | c08729a60f0c7f465b85417a26f0e0f7ff27c19c /plugins/TabSRMM/src | |
parent | 37481a4f6fa9e8b05f0946771c3a15dc3d9fd797 (diff) |
fix for processing background color in tabSRMM chats
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/msgdlgutils.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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");
}
|