Browse Source

Can copy a (report) URL to clipboard instead of opening it

Source commit: eadef38c2fccb754cceddafd989d1b2698f5a708
Martin Prikryl 6 years ago
parent
commit
89b7194556
1 changed files with 4 additions and 1 deletions
  1. 4 1
      source/windows/Tools.cpp

+ 4 - 1
source/windows/Tools.cpp

@@ -702,7 +702,10 @@ void __fastcall OpenBrowser(UnicodeString URL)
     DebugAssert(!IsHttpUrl(URL));
     URL = CampaignUrl(URL);
   }
-  ShellExecute(Application->Handle, L"open", URL.c_str(), NULL, NULL, SW_SHOWNORMAL);
+  if (!CopyCommandToClipboard(URL))
+  {
+    ShellExecute(Application->Handle, L"open", URL.c_str(), NULL, NULL, SW_SHOWNORMAL);
+  }
 }
 //---------------------------------------------------------------------------
 void __fastcall OpenFolderInExplorer(const UnicodeString & Path)