mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 20:50:39 +02:00
IDE: disable Export button when there is nothing to export in component palette configuration.
git-svn-id: trunk@47230 -
This commit is contained in:
parent
78c1e7ea80
commit
30724bdc59
@ -194,8 +194,10 @@ procedure TCompPaletteOptionsFrame.ActualReadSettings;
|
|||||||
begin
|
begin
|
||||||
Assert(fLocalUserOrder.Options = fLocalOptions, 'fLocalUserOrder.Options <> fLocalOptions');
|
Assert(fLocalUserOrder.Options = fLocalOptions, 'fLocalUserOrder.Options <> fLocalOptions');
|
||||||
fLocalUserOrder.SortPagesAndCompsUserOrder;
|
fLocalUserOrder.SortPagesAndCompsUserOrder;
|
||||||
FillPages; // Initial visibility for RestoreButton.
|
FillPages;
|
||||||
|
// Initial enabled-state for buttons.
|
||||||
RestoreButton.Enabled := not fLocalOptions.IsDefault;
|
RestoreButton.Enabled := not fLocalOptions.IsDefault;
|
||||||
|
ExportButton.Enabled := RestoreButton.Enabled;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCompPaletteOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
procedure TCompPaletteOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
|
||||||
@ -416,6 +418,7 @@ begin
|
|||||||
fLocalUserOrder.SortPagesAndCompsUserOrder; // Only updates data structure.
|
fLocalUserOrder.SortPagesAndCompsUserOrder; // Only updates data structure.
|
||||||
FillPages;
|
FillPages;
|
||||||
RestoreButton.Enabled := False;
|
RestoreButton.Enabled := False;
|
||||||
|
ExportButton.Enabled := False;
|
||||||
fConfigChanged := True;
|
fConfigChanged := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -690,6 +693,7 @@ procedure TCompPaletteOptionsFrame.MarkAsChanged;
|
|||||||
begin
|
begin
|
||||||
// ToDo: compare settings with original palette options after each change.
|
// ToDo: compare settings with original palette options after each change.
|
||||||
RestoreButton.Enabled := True;
|
RestoreButton.Enabled := True;
|
||||||
|
ExportButton.Enabled := True;
|
||||||
fConfigChanged := True;
|
fConfigChanged := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user