File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ procedure TCopyTableForm.FormClose(Sender: TObject; var Action: TCloseAction);
172172 Node := TreeElements.GetNextSibling(Node);
173173 end ;
174174 // Store recent filters
175- if MemoFilter.Enabled and ( not MemoFilter.TextIsEmpty) then begin
175+ if MemoFilter.Enabled and MemoFilter.HasText then begin
176176 NewValues := TStringList.Create;
177177 NewValues.Add(MemoFilter.Text);
178178 for i:=1 to 20 do begin
@@ -479,7 +479,7 @@ procedure TCopyTableForm.btnOKClick(Sender: TObject);
479479 DataCols := Trim(DataCols);
480480 Delete(DataCols, Length(DataCols), 1 );
481481 InsertCode := ' INSERT INTO ' +TargetTable+' (' +DataCols+' ) SELECT ' + DataCols + ' FROM ' + FDBObj.QuotedName;
482- if not MemoFilter.TextIsEmpty then
482+ if MemoFilter.HasText then
483483 InsertCode := InsertCode + ' WHERE ' + MemoFilter.Text;
484484 end ;
485485
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ interface
1818 TSynEditHelper = class helper for TSynEdit
1919 public
2020 function GetTextLen : Integer;
21- function TextIsEmpty : Boolean;
21+ function HasText : Boolean;
2222 function ConvertCodeStringToCommand (AString: string): TSynEditorCommand;
2323 function IndexToEditorCommand (const AIndex: Integer): Integer;
2424 end ;
@@ -166,10 +166,10 @@ function TSynEditHelper.GetTextLen: Integer;
166166 Result := Length(Text);
167167end ;
168168
169- function TSynEditHelper.TextIsEmpty : Boolean;
169+ function TSynEditHelper.HasText : Boolean;
170170begin
171171 // Introduced because GetTextLen seems to be unreliable, probably due to the lack of Trim()
172- Result := Trim(Text).IsEmpty;
172+ Result := not Trim(Text).IsEmpty;
173173end ;
174174
175175function TSynEditHelper.ConvertCodeStringToCommand (AString: string): TSynEditorCommand;
You can’t perform that action at this time.
0 commit comments