From acedfc7c87f49a60b0ddae70a57bcdca0f28ecc1 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Mon, 17 Jun 2024 07:54:54 +0200 Subject: [PATCH] Table editor: disallow editing direction/collation of index node level --- source/table_editor.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/table_editor.pas b/source/table_editor.pas index ac61138f..54ca499e 100644 --- a/source/table_editor.pas +++ b/source/table_editor.pas @@ -2066,9 +2066,11 @@ begin VT := Sender as TVirtualStringtree; Allowed := False; if VT.GetNodeLevel(Node) = 0 then begin - // Disallow renaming primary key - if (Column <> 0) or (VT.Text[Node, 1] <> TTableKey.PRIMARY) then + // Disallow renaming primary key, and direction/collation of key node level + if (Column = 0) and (VT.Text[Node, 1] <> TTableKey.PRIMARY) then Allowed := True + else + Allowed := Column in [1,2,3]; end else case Column of 0: Allowed := True; 1: begin