Jelajahi Sumber

Fixed issue with drag with custom name with multiple clips selected

Scott Brogden 4 tahun lalu
induk
melakukan
8d7c27b43c
2 mengubah file dengan 26 tambahan dan 12 penghapusan
  1. 4 4
      DittoSetup/BuildDitto.bld
  2. 22 8
      OleClipSource.cpp

+ 4 - 4
DittoSetup/BuildDitto.bld

@@ -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>
@@ -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>
@@ -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>

+ 22 - 8
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
 					{