Explorar el Código

Leave selection as is when copying with ctrl-c

Scott Brogden hace 3 años
padre
commit
c1fa38144a
Se han modificado 2 ficheros con 10 adiciones y 8 borrados
  1. 5 1
      ProcessPaste.cpp
  2. 5 7
      QPasteWnd.cpp

+ 5 - 1
ProcessPaste.cpp

@@ -185,6 +185,8 @@ UINT CProcessPaste::MarkAsPastedThread(LPVOID pParam)
 
 	try
 	{
+		int refreshFlags = 0;
+
 		MarkAsPastedData* pData = (MarkAsPastedData*)pParam;
 		if(pData)
 		{
@@ -194,6 +196,8 @@ UINT CProcessPaste::MarkAsPastedThread(LPVOID pParam)
 				pData->updateClipOrder &&
 				clipCount == 1)
 			{
+				refreshFlags |= UPDATE_AFTER_PASTE_SELECT_CLIP;
+
 				for (int i = 0; i < clipCount; i++)
 				{
 					int id = pData->ids.ElementAt(i);
@@ -246,7 +250,7 @@ UINT CProcessPaste::MarkAsPastedThread(LPVOID pParam)
 			{
 				int id = pData->ids.ElementAt(i);
 
-				theApp.RefreshClipAfterPaste(id, 0);
+				theApp.RefreshClipAfterPaste(id, refreshFlags);
 				break;
 			}			
 

+ 5 - 7
QPasteWnd.cpp

@@ -1216,19 +1216,17 @@ LRESULT CQPasteWnd::OnReloadClipAfterPaste(WPARAM wParam, LPARAM lParam)
 
 				foundClip = TRUE;
 
-				//if (updateFlags & UPDATE_AFTER_PASTE_SELECT_CLIP)
-				{
-					theApp.m_FocusID = -1;
-					
-				}
-
 				//if (updateFlags & UPDATE_AFTER_PASTE_REFRESH_VISIBLE)
 				{
 					m_lstHeader.RefreshVisibleRows();
 					m_lstHeader.RedrawWindow();
 				}
 
-				SelectFocusID();
+				if (updateFlags & UPDATE_AFTER_PASTE_SELECT_CLIP)
+				{
+					theApp.m_FocusID = -1;
+					SelectFocusID();
+				}
 
 				break;
 			}