Skip to content

Commit

Permalink
Catch exceptions copying from AlertDlg (#3367)
Browse files Browse the repository at this point in the history
Fixed unhandled error pressing copy button on message box when another application has the clipboard locked (reported by Brendan)
AlertDlg now uses ClipboardHelper to catch clipboard locked exceptions.
This got broken when CommonAlertDlg base class was created in CommonUtil.
"CommonAlertDlg.CopyMessage" was supposed to be overridden for Skyline's extra error handling.
  • Loading branch information
nickshulman authored Feb 23, 2025
1 parent 1ee5426 commit 207c92d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pwiz_tools/Skyline/Alerts/AlertDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,9 @@ protected override void OnLoad(EventArgs e)
base.OnLoad(e);
GetModeUIHelper().OnLoad(this);
}
public override void CopyMessage()
{
ClipboardHelper.SetSystemClipboardText(this, GetTitleAndMessageDetail());
}
}
}

0 comments on commit 207c92d

Please sign in to comment.