mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
refactor: rename TSynEditHelper.TextIsEmpty to HasText
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user