Skip to content

Commit 8d7c27b

Browse files
committed
Fixed issue with drag with custom name with multiple clips selected
1 parent 4b718e1 commit 8d7c27b

File tree

2 files changed

+26
-12
lines changed

2 files changed

+26
-12
lines changed

DittoSetup/BuildDitto.bld

+4-4
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ End If
229229
<outputfrom type='3'>1</outputfrom>
230230
</step>
231231
<step action='Run Program'>
232-
<command>"%workDir%\DittoSetup\Build Portable ZIP_10.bat" "DittoPortable_%versionFileName%" bit32</command>
232+
<command>"%workDir%\DittoSetup\BuildPortableZIP.bat" "DittoPortable_%versionFileName%" bit32</command>
233233
<indent type='3'>1</indent>
234234
<name>Build Portable 32</name>
235235
<outputfrom type='3'>1</outputfrom>
236236
<startin>%workDir%\DittoSetup\</startin>
237237
</step>
238238
<step action='Run Program'>
239-
<command>"%workDir%\DittoSetup\Build Portable ZIP_10.bat" "DittoPortable_64bit_%versionFileName%" bit64</command>
239+
<command>"%workDir%\DittoSetup\BuildPortableZIP.bat" "DittoPortable_64bit_%versionFileName%" bit64</command>
240240
<indent type='3'>1</indent>
241241
<name>Build Portable 64</name>
242242
<outputfrom type='3'>1</outputfrom>
@@ -2935,7 +2935,7 @@ var sc_security="b3f57099";
29352935
</step>
29362936
<step action='Git'>
29372937
<Command>log</Command>
2938-
<Options>--pretty=format:"%%ad %%s" --date=short --since=2020-10-26</Options>
2938+
<Options>--pretty=format:"%%ad %%s" --date=short --since=2021-02-27</Options>
29392939
<WorkDir>%workDir%</WorkDir>
29402940
<buildfailsteps type='11'>0</buildfailsteps>
29412941
<indent type='3'>2</indent>
@@ -3054,7 +3054,7 @@ var sc_security="b3f57099";
30543054
<value>3</value>
30553055
</macro>
30563056
<macro name='verMinor'>
3057-
<value>23</value>
3057+
<value>24</value>
30583058
</macro>
30593059
<macro name='verRevision'>
30603060
<value>0</value>

OleClipSource.cpp

+22-8
Original file line numberDiff line numberDiff line change
@@ -1155,11 +1155,16 @@ HGLOBAL COleClipSource::ConvertToFileDrop()
11551155
if (g_Opt.GetTempDragFileName() != _T(""))
11561156
{
11571157
name = g_Opt.GetTempDragFileName();
1158-
CString id;
1158+
CString id;
11591159
id.Format(_T("%d"), dragId++);
1160-
name.Replace(_T("#"), id);
11611160

1162-
file.Format(_T("%s%s.txt"), path, name);
1161+
CString fileId = "";
1162+
if (name.Replace(_T("#"), id) == 0 && m_ClipIDs.GetCount() > 0)
1163+
{
1164+
fileId = "_" + id;
1165+
}
1166+
1167+
file.Format(_T("%s%s%s.txt"), path, name, fileId);
11631168
}
11641169
else
11651170
{
@@ -1180,10 +1185,15 @@ HGLOBAL COleClipSource::ConvertToFileDrop()
11801185
{
11811186
name = g_Opt.GetTempDragFileName();
11821187
CString id;
1183-
id.Format(_T("%d"), dragId++);
1184-
name.Replace(_T("#"), id);
1188+
id.Format(_T("%d"), dragId++);
1189+
1190+
CString fileId = "";
1191+
if (name.Replace(_T("#"), id) == 0 && m_ClipIDs.GetCount() > 0)
1192+
{
1193+
fileId = "_" + id;
1194+
}
11851195

1186-
file.Format(_T("%s%s.txt"), path, name);
1196+
file.Format(_T("%s%s%s.txt"), path, name, fileId);
11871197
}
11881198
else
11891199
{
@@ -1212,9 +1222,13 @@ HGLOBAL COleClipSource::ConvertToFileDrop()
12121222
name = g_Opt.GetTempDragFileName();
12131223
CString id;
12141224
id.Format(_T("%d"), dragId++);
1215-
name.Replace(_T("#"), id);
1225+
CString fileId = "";
1226+
if (name.Replace(_T("#"), id) == 0 && m_ClipIDs.GetCount() > 0)
1227+
{
1228+
fileId = "_" + id;
1229+
}
12161230

1217-
file.Format(_T("%s%s.png"), path, name);
1231+
file.Format(_T("%s%s%s.png"), path, name, fileId);
12181232
}
12191233
else
12201234
{

0 commit comments

Comments
 (0)