diff --git a/source/copytable.pas b/source/copytable.pas index 49913fca..580f410f 100644 --- a/source/copytable.pas +++ b/source/copytable.pas @@ -172,7 +172,7 @@ begin Node := TreeElements.GetNextSibling(Node); end; // Store recent filters - if MemoFilter.Enabled and (not MemoFilter.TextIsEmpty) then begin + if MemoFilter.Enabled and MemoFilter.HasText then begin NewValues := TStringList.Create; NewValues.Add(MemoFilter.Text); for i:=1 to 20 do begin @@ -479,7 +479,7 @@ begin DataCols := Trim(DataCols); Delete(DataCols, Length(DataCols), 1); InsertCode := 'INSERT INTO '+TargetTable+' ('+DataCols+') SELECT ' + DataCols + ' FROM ' + FDBObj.QuotedName; - if not MemoFilter.TextIsEmpty then + if MemoFilter.HasText then InsertCode := InsertCode + ' WHERE ' + MemoFilter.Text; end; diff --git a/source/lazaruscompat.pas b/source/lazaruscompat.pas index 050bd3c7..8f084ef3 100644 --- a/source/lazaruscompat.pas +++ b/source/lazaruscompat.pas @@ -18,7 +18,7 @@ type TSynEditHelper = class helper for TSynEdit public function GetTextLen: Integer; - function TextIsEmpty: Boolean; + function HasText: Boolean; function ConvertCodeStringToCommand(AString: string): TSynEditorCommand; function IndexToEditorCommand(const AIndex: Integer): Integer; end; @@ -166,10 +166,10 @@ begin Result := Length(Text); end; -function TSynEditHelper.TextIsEmpty: Boolean; +function TSynEditHelper.HasText: Boolean; begin // Introduced because GetTextLen seems to be unreliable, probably due to the lack of Trim() - Result := Trim(Text).IsEmpty; + Result := not Trim(Text).IsEmpty; end; function TSynEditHelper.ConvertCodeStringToCommand(AString: string): TSynEditorCommand;