mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-05 09:18:02 +02:00
IDEIntf/TGraphicPropertyEditor: Update enabled state of Clear button.
This commit is contained in:
parent
2ee50f02d8
commit
8c91606093
@ -203,6 +203,7 @@ object GraphicPropertyEditorForm: TGraphicPropertyEditorForm
|
||||
Hint = 'Delete'
|
||||
ShortCut = 46
|
||||
OnExecute = ClearActionExecute
|
||||
OnUpdate = ClearActionUpdate
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -47,6 +47,7 @@ type
|
||||
GroupBox1: TGroupBox;
|
||||
SaveDialog: TSavePictureDialog;
|
||||
ScrollBox: TScrollBox;
|
||||
procedure ClearActionUpdate(Sender: TObject);
|
||||
procedure CopyActionExecute(Sender: TObject);
|
||||
procedure CopyActionUpdate(Sender: TObject);
|
||||
procedure FormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction);
|
||||
@ -115,6 +116,11 @@ begin
|
||||
Clipboard.Assign(ImagePreview.Picture.Graphic);
|
||||
end;
|
||||
|
||||
procedure TGraphicPropertyEditorForm.ClearActionUpdate(Sender: TObject);
|
||||
begin
|
||||
ClearAction.Enabled := ImagePreview.Picture.Graphic <> nil;
|
||||
end;
|
||||
|
||||
procedure TGraphicPropertyEditorForm.CopyActionUpdate(Sender: TObject);
|
||||
begin
|
||||
CopyAction.Enabled := ImagePreview.Picture.Graphic <> nil;
|
||||
|
Loading…
Reference in New Issue
Block a user