Skip to content
Permalink
Browse files

Revert a part of commit:7ed97b3fe2f989b19bd282ae00c64de8e7b4871d whic…

…h should have fixed a resizing bug on the query helpers box. See https://www.heidisql.com/forum.php?t=35096
  • Loading branch information
ansgarbecker committed Dec 19, 2019
1 parent 168e49a commit 5a350967c76357cc554ec4d152f6c45ab54954e0
Showing with 6 additions and 11 deletions.
  1. +3 −1 source/main.dfm
  2. +3 −10 source/main.pas
@@ -1279,8 +1279,8 @@ object MainForm: TMainForm
Height = 96
Align = alTop
BevelOuter = bvNone
Constraints.MinHeight = 40
TabOrder = 0
OnCanResize = pnlQueryMemoCanResize
object spltQueryHelpers: TSplitter
Left = 607
Top = 0
@@ -1297,6 +1297,7 @@ object MainForm: TMainForm
Height = 96
SingleLineMode = False
Align = alClient
Constraints.MinWidth = 20
ActiveLineColor = clWindow
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -1363,6 +1364,7 @@ object MainForm: TMainForm
Align = alRight
BevelOuter = bvNone
Caption = 'pnlQueryHelpers'
Constraints.MinWidth = 20
TabOrder = 1
object treeQueryHelpers: TVirtualStringTree
Left = 0
@@ -824,8 +824,6 @@ TMainForm = class(TExtForm)
procedure AnyGridBeforeCellPaint(Sender: TBaseVirtualTree;
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
procedure pnlQueryMemoCanResize(Sender: TObject; var NewWidth,
NewHeight: Integer; var Resize: Boolean);
procedure AnyGridMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure MainMenuFileClick(Sender: TObject);
@@ -9915,14 +9913,6 @@ function TMainForm.GetRegKeyTable: String;
end;


procedure TMainForm.pnlQueryMemoCanResize(Sender: TObject; var NewWidth,
NewHeight: Integer; var Resize: Boolean);
begin
// Ensure visibility of query memo while resizing
Resize := NewWidth >= pnlQueryHelpers.Width + spltQueryHelpers.Width + 40;
end;


procedure TMainForm.AnyGridMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
@@ -10710,10 +10700,12 @@ procedure TMainForm.actNewQueryTabExecute(Sender: TObject);
QueryTab.pnlMemo.BevelOuter := pnlQueryMemo.BevelOuter;
QueryTab.pnlMemo.Align := pnlQueryMemo.Align;
QueryTab.pnlMemo.Height := pnlQueryMemo.Height;
QueryTab.pnlMemo.Constraints := pnlQueryMemo.Constraints;

QueryTab.Memo := TSynMemo.Create(QueryTab.pnlMemo);
QueryTab.Memo.Parent := QueryTab.pnlMemo;
QueryTab.Memo.Align := SynMemoQuery.Align;
QueryTab.Memo.Constraints := SynMemoQuery.Constraints;
QueryTab.Memo.Left := SynMemoQuery.Left;
QueryTab.Memo.Options := SynMemoQuery.Options;
QueryTab.Memo.PopupMenu := SynMemoQuery.PopupMenu;
@@ -10745,6 +10737,7 @@ procedure TMainForm.actNewQueryTabExecute(Sender: TObject);
QueryTab.pnlHelpers := TPanel.Create(QueryTab.pnlMemo);
QueryTab.pnlHelpers.Parent := QueryTab.pnlMemo;
QueryTab.pnlHelpers.Align := pnlQueryHelpers.Align;
QueryTab.pnlHelpers.Constraints := pnlQueryHelpers.Constraints;
QueryTab.pnlHelpers.BevelOuter := pnlQueryHelpers.BevelOuter;
QueryTab.pnlHelpers.Left := pnlQueryHelpers.Left;
QueryTab.pnlHelpers.Width := pnlQueryHelpers.Width;

0 comments on commit 5a35096

Please sign in to comment.
You can’t perform that action at this time.