Skip to content

Commit 6727efc

Browse files
committed
fix: crash on macOS while setting listForeignKeys.Width
Refs #2570
1 parent d0818d4 commit 6727efc

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

source/table_editor.lfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ object frmTableEditor: TfrmTableEditor
617617
Height = 142
618618
Top = 0
619619
Width = 178
620-
Anchors = [akTop, akLeft, akRight, akBottom]
620+
Anchors = [akTop, akRight, akBottom]
621621
AutoWidthLastColumn = True
622622
BorderStyle = bsNone
623623
Columns = <
@@ -649,7 +649,7 @@ object frmTableEditor: TfrmTableEditor
649649
Top = 0
650650
Width = 8
651651
Align = alNone
652-
Anchors = [akTop, akBottom]
652+
Anchors = [akTop, akRight, akBottom]
653653
ResizeAnchor = akRight
654654
Visible = False
655655
end

source/table_editor.pas

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1116,7 +1116,8 @@ procedure TfrmTableEditor.btnShowReverseForeignKeysClick(Sender: TObject);
11161116
else begin
11171117
ListViewReverseForeignKeys.Visible := False;
11181118
spltForeignKeyListings.Visible := False;
1119-
listForeignKeys.Width := listForeignKeys.Parent.Width - tlbForeignKeys.Width;
1119+
// Issue #2570: following line would crash on macOS. No need to set the width with correct anchoring.
1120+
// listForeignKeys.Width := listForeignKeys.Parent.Width - tlbForeignKeys.Width;
11201121
end;
11211122
AppSettings.WriteBool(asDisplayReverseForeignKeys, DoShow);
11221123
end;

0 commit comments

Comments
 (0)