SynMemo.PasteFromClipboard sometimes throws some "Cannot open clipboard" exception - don't know why. Turn the exception into a simple message dialog.

This commit is contained in:
Ansgar Becker
2010-09-09 21:53:29 +00:00
parent a2aa3f3438
commit eb4ec87ba4

View File

@ -7974,8 +7974,12 @@ begin
end else if Control is TSynMemo then begin
SynMemo := TSynMemo(Control);
if not SynMemo.ReadOnly then begin
SynMemo.PasteFromClipboard;
Success := True;
try
SynMemo.PasteFromClipboard;
Success := True;
except on E:Exception do
MessageDlg(E.Message, mtError, [mbOK], 0);
end;
end;
end;
if not Success then