mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 01:51:18 +02:00
IDE/Options: Handle exception when saving project icon to file. Issue #36828
(cherry picked from commit 024055f99b
)
This commit is contained in:
parent
448628e758
commit
1d56e79ea9
@ -10,6 +10,7 @@ uses
|
||||
FileUtil,
|
||||
// LCL
|
||||
LCLType, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, Buttons, ComCtrls, ExtDlgs,
|
||||
LCLStrConsts,
|
||||
// LazControls
|
||||
DividerBevel,
|
||||
// IdeIntf
|
||||
@ -194,8 +195,16 @@ end;
|
||||
|
||||
procedure TProjectApplicationOptionsFrame.SaveIconButtonClick(Sender: TObject);
|
||||
begin
|
||||
if (IconImage.Picture.Graphic = nil) or IconImage.Picture.Graphic.Empty then
|
||||
exit;
|
||||
|
||||
if SavePictureDialog1.Execute then
|
||||
IconImage.Picture.SaveToFile(SavePictureDialog1.FileName);
|
||||
try
|
||||
IconImage.Picture.SaveToFile(SavePictureDialog1.FileName);
|
||||
except
|
||||
on E: Exception do
|
||||
IDEMessageDialog(rsMtError, E.Message, mtError, [mbCancel]);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TProjectApplicationOptionsFrame.UseAppBundleCheckBoxChange(
|
||||
|
Loading…
Reference in New Issue
Block a user