From 8d7c27b43c8917a2771add7bcd80c2ea1047a025 Mon Sep 17 00:00:00 2001 From: Scott Brogden Date: Sat, 28 Aug 2021 07:16:32 -0600 Subject: [PATCH] Fixed issue with drag with custom name with multiple clips selected --- DittoSetup/BuildDitto.bld | 8 ++++---- OleClipSource.cpp | 30 ++++++++++++++++++++++-------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/DittoSetup/BuildDitto.bld b/DittoSetup/BuildDitto.bld index fbbd0542..37ee408d 100644 --- a/DittoSetup/BuildDitto.bld +++ b/DittoSetup/BuildDitto.bld @@ -229,14 +229,14 @@ End If 1 - "%workDir%\DittoSetup\Build Portable ZIP_10.bat" "DittoPortable_%versionFileName%" bit32 + "%workDir%\DittoSetup\BuildPortableZIP.bat" "DittoPortable_%versionFileName%" bit32 1 Build Portable 32 1 %workDir%\DittoSetup\ - "%workDir%\DittoSetup\Build Portable ZIP_10.bat" "DittoPortable_64bit_%versionFileName%" bit64 + "%workDir%\DittoSetup\BuildPortableZIP.bat" "DittoPortable_64bit_%versionFileName%" bit64 1 Build Portable 64 1 @@ -2935,7 +2935,7 @@ var sc_security="b3f57099"; log - --pretty=format:"%%ad %%s" --date=short --since=2020-10-26 + --pretty=format:"%%ad %%s" --date=short --since=2021-02-27 %workDir% 0 2 @@ -3054,7 +3054,7 @@ var sc_security="b3f57099"; 3 - 23 + 24 0 diff --git a/OleClipSource.cpp b/OleClipSource.cpp index cec2dd46..1296c0e7 100644 --- a/OleClipSource.cpp +++ b/OleClipSource.cpp @@ -1155,11 +1155,16 @@ HGLOBAL COleClipSource::ConvertToFileDrop() if (g_Opt.GetTempDragFileName() != _T("")) { name = g_Opt.GetTempDragFileName(); - CString id; + CString id; id.Format(_T("%d"), dragId++); - name.Replace(_T("#"), id); - file.Format(_T("%s%s.txt"), path, name); + CString fileId = ""; + if (name.Replace(_T("#"), id) == 0 && m_ClipIDs.GetCount() > 0) + { + fileId = "_" + id; + } + + file.Format(_T("%s%s%s.txt"), path, name, fileId); } else { @@ -1180,10 +1185,15 @@ HGLOBAL COleClipSource::ConvertToFileDrop() { name = g_Opt.GetTempDragFileName(); CString id; - id.Format(_T("%d"), dragId++); - name.Replace(_T("#"), id); + id.Format(_T("%d"), dragId++); + + CString fileId = ""; + if (name.Replace(_T("#"), id) == 0 && m_ClipIDs.GetCount() > 0) + { + fileId = "_" + id; + } - file.Format(_T("%s%s.txt"), path, name); + file.Format(_T("%s%s%s.txt"), path, name, fileId); } else { @@ -1212,9 +1222,13 @@ HGLOBAL COleClipSource::ConvertToFileDrop() name = g_Opt.GetTempDragFileName(); CString id; id.Format(_T("%d"), dragId++); - name.Replace(_T("#"), id); + CString fileId = ""; + if (name.Replace(_T("#"), id) == 0 && m_ClipIDs.GetCount() > 0) + { + fileId = "_" + id; + } - file.Format(_T("%s%s.png"), path, name); + file.Format(_T("%s%s%s.png"), path, name, fileId); } else {