From a954f31417688712d2c8f5318bd77b5721195beb Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Fri, 6 Mar 2015 22:23:35 +0100 Subject: [PATCH] removed useless code this didn't fix the bug "first hint window size is wrong" --- src/ce_synmemo.pas | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index 8bf4c9f5..65d3f6bc 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -18,7 +18,6 @@ type TCEEditorHintWindow = class(THintWindow) public class var FontSize: Integer; - constructor Create(AOwner: TComponent); override; function CalcHintRect(MaxWidth: Integer; const AHint: String; AData: Pointer): TRect; override; end; @@ -139,15 +138,9 @@ implementation uses ce_interfaces, ce_staticmacro, ce_dcd, SynEditHighlighterFoldBase; -constructor TCEEditorHintWindow.Create(AOwner: TComponent); -begin - inherited; - Canvas.Font.Size:= FontSize; -end; - function TCEEditorHintWindow.CalcHintRect(MaxWidth: Integer; const AHint: String; AData: Pointer): TRect; begin - Canvas.Font.Size:= FontSize; + Font.Size:= FontSize; result := inherited CalcHintRect(MaxWidth, AHint, AData); end; @@ -156,7 +149,7 @@ constructor TCESynMemoCache.create(aComponent: TComponent); begin inherited create(nil); if (aComponent is TCESynMemo) then - fMemo := TCESynMemo(aComponent); + fMemo := TCESynMemo(aComponent); fFolds := TCollection.Create(TCEFoldCache); end;