Skip to content

Commit 42abf46

Browse files
committed
fix: a TSpeedButton connected to a TAction, and a TMenuItem were not auto-checking
1 parent 2a23e26 commit 42abf46

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

source/main.lfm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,9 @@ object MainForm: TMainForm
905905
Top = 0
906906
Width = 23
907907
Action = actFavoriteObjectsOnly
908+
AllowAllUp = True
908909
Anchors = [akTop, akRight]
910+
GroupIndex = 1
909911
Images = ImageListMain
910912
ImageIndex = 113
911913
ShowCaption = False
@@ -20434,6 +20436,7 @@ object MainForm: TMainForm
2043420436
AutoCheck = True
2043520437
end
2043620438
object menuShowSizeColumn: TMenuItem
20439+
AutoCheck = True
2043720440
Caption = 'Display size of objects'
2043820441
OnClick = menuShowSizeColumnClick
2043920442
end

source/main.pas

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12641,8 +12641,7 @@ procedure TMainForm.CloseQueryTab(PageIndex: Integer);
1264112641
procedure TMainForm.actFavoriteObjectsOnlyExecute(Sender: TObject);
1264212642
begin
1264312643
// Click on "tree favorites" main button
12644-
// actFavoriteObjectsOnly.AutoCheck does not work?
12645-
//actFavoriteObjectsOnly.Checked := not actFavoriteObjectsOnly.Checked;
12644+
// Note: a TSpeedButton connected to an auto-checked TAction needs AllowAllUp + GroupIndex>0
1264612645
editDatabaseTableFilterChange(Sender);
1264712646
if actFavoriteObjectsOnly.Checked then
1264812647
actFavoriteObjectsOnly.ImageIndex := 112

0 commit comments

Comments
 (0)