Skip to content

Commit

Permalink
Fixed issue with drag with custom name with multiple clips selected
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrogden committed Aug 28, 2021
1 parent 4b718e1 commit 8d7c27b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 12 deletions.
8 changes: 4 additions & 4 deletions DittoSetup/BuildDitto.bld
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ End If
<outputfrom type='3'>1</outputfrom>
</step>
<step action='Run Program'>
<command>"%workDir%\DittoSetup\Build Portable ZIP_10.bat" "DittoPortable_%versionFileName%" bit32</command>
<command>"%workDir%\DittoSetup\BuildPortableZIP.bat" "DittoPortable_%versionFileName%" bit32</command>
<indent type='3'>1</indent>
<name>Build Portable 32</name>
<outputfrom type='3'>1</outputfrom>
<startin>%workDir%\DittoSetup\</startin>
</step>
<step action='Run Program'>
<command>"%workDir%\DittoSetup\Build Portable ZIP_10.bat" "DittoPortable_64bit_%versionFileName%" bit64</command>
<command>"%workDir%\DittoSetup\BuildPortableZIP.bat" "DittoPortable_64bit_%versionFileName%" bit64</command>
<indent type='3'>1</indent>
<name>Build Portable 64</name>
<outputfrom type='3'>1</outputfrom>
Expand Down Expand Up @@ -2935,7 +2935,7 @@ var sc_security="b3f57099";
</step>
<step action='Git'>
<Command>log</Command>
<Options>--pretty=format:"%%ad %%s" --date=short --since=2020-10-26</Options>
<Options>--pretty=format:"%%ad %%s" --date=short --since=2021-02-27</Options>
<WorkDir>%workDir%</WorkDir>
<buildfailsteps type='11'>0</buildfailsteps>
<indent type='3'>2</indent>
Expand Down Expand Up @@ -3054,7 +3054,7 @@ var sc_security="b3f57099";
<value>3</value>
</macro>
<macro name='verMinor'>
<value>23</value>
<value>24</value>
</macro>
<macro name='verRevision'>
<value>0</value>
Expand Down
30 changes: 22 additions & 8 deletions OleClipSource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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
{
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit 8d7c27b

Please sign in to comment.