From d1caa1504479537d10cce4385688cb0cce9ff7dd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 15 May 2021 21:16:21 +0300 Subject: =?UTF-8?q?for=20#2881=20(p.1,=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=B4=D0=B5=D0=BB=D0=B8=D1=82=D1=8C=20=D0=B2=20=D0=BE?= =?UTF-8?q?=D0=BA=D0=BD=D0=B5=20QS=20=D0=BD=D0=B5=D1=81=D0=BA=D0=BE=D0=BB?= =?UTF-8?q?=D1=8C=D0=BA=D0=BE=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B8=20=D1=81=D0=BA=D0=BE=D0=BF=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D1=82=D1=8C,=20=D1=82=D0=BE=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BF=D0=B8=D1=80=D1=83=D1=8E=D1=82=D1=81=D1=8F=20=D0=B2=D1=81?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=82=D0=B0=D0=BA=D1=82=D1=8B,=20?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B5=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=B4=D0=B5=D0=BB=D0=B5=D0=BD=D0=BD=D1=8B=D0=B5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/QuickSearch/src/stdafx.h | 1 + plugins/QuickSearch/src/window_misc.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'plugins/QuickSearch/src') diff --git a/plugins/QuickSearch/src/stdafx.h b/plugins/QuickSearch/src/stdafx.h index f2a830e9d7..a6cd211e45 100644 --- a/plugins/QuickSearch/src/stdafx.h +++ b/plugins/QuickSearch/src/stdafx.h @@ -274,6 +274,7 @@ struct CRowItem : public QSFlags wchar_t *text = nullptr; UINT_PTR data = UINT_PTR(-1); + wchar_t* getText() const { return (text) ? text : L""; } void LoadOneItem(MCONTACT hContact, const ColumnItem &pCol, class QSMainDlg *pDlg); } *pValues; diff --git a/plugins/QuickSearch/src/window_misc.cpp b/plugins/QuickSearch/src/window_misc.cpp index d636374896..9013619723 100644 --- a/plugins/QuickSearch/src/window_misc.cpp +++ b/plugins/QuickSearch/src/window_misc.cpp @@ -119,13 +119,18 @@ void QSMainDlg::CopyMultiLines() buf.Append(L"\r\n"); int nRows = m_grid.GetItemCount(); + int nSelected = m_grid.GetSelectedCount(); + for (int j = 0; j < nRows; j++) { + if (nSelected > 1 && !m_grid.GetItemState(j, LVIS_SELECTED)) + continue; + auto *pRow = GetRow(j); i = 0; for (auto &it : g_plugin.m_columns) { if (it->bEnabled && it->width >= 10) - buf.AppendFormat(L"%s\t", pRow->pValues[i].text); + buf.AppendFormat(L"%s\t", pRow->pValues[i].getText()); i++; } buf.Append(L"\r\n"); -- cgit v1.2.3