Browse Source

fixed dragging images with a custom file name

Scott Brogden 4 years ago
parent
commit
d78e5cbbf5
2 changed files with 5 additions and 5 deletions
  1. 4 4
      OleClipSource.cpp
  2. 1 1
      Options.cpp

+ 4 - 4
OleClipSource.cpp

@@ -1156,7 +1156,7 @@ HGLOBAL COleClipSource::ConvertToFileDrop()
 			{
 				name = g_Opt.GetTempDragFileName();
 				CString id;
-				id.Format(_T("%d", dragId++));
+				id.Format(_T("%d"), dragId++);
 				name.Replace(_T("#"), id);
 
 				file.Format(_T("%s%s.txt"), path, name);
@@ -1180,7 +1180,7 @@ HGLOBAL COleClipSource::ConvertToFileDrop()
 				{
 					name = g_Opt.GetTempDragFileName();
 					CString id;
-					id.Format(_T("%d", dragId++));
+					id.Format(_T("%d"), dragId++);
 					name.Replace(_T("#"), id);
 
 					file.Format(_T("%s%s.txt"), path, name);
@@ -1211,10 +1211,10 @@ HGLOBAL COleClipSource::ConvertToFileDrop()
 					{
 						name = g_Opt.GetTempDragFileName();
 						CString id;
-						id.Format(_T("%d", dragId++));
+						id.Format(_T("%d"), dragId++);
 						name.Replace(_T("#"), id);
 
-						file.Format(_T("%s%s.txt"), path, name);
+						file.Format(_T("%s%s.png"), path, name);
 					}
 					else
 					{

+ 1 - 1
Options.cpp

@@ -2936,7 +2936,7 @@ void CGetSetOptions::SetNetworkBindIPAddress(CString val)
 CString CGetSetOptions::GetTempDragFileName()
 {
 	auto diff = CTime::GetCurrentTime() - m_tempDragFileNameSetTime;
-	if (diff.GetTotalSeconds() < 60 * 5)
+	if (diff.GetTotalSeconds() < 60 * 2)
 	{
 		return m_tempDragFileName;
 	}