Skip to content

Commit 2863a80

Browse files
committed
1 parent 857cca8 commit 2863a80

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

source/apphelpers.pas

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,7 @@ TAppSettings = class(TObject)
396396
//function GetImageLinkTimeStamp(const FileName: string): TDateTime;
397397
function IsEmpty(Str: String): Boolean;
398398
function IsNotEmpty(Str: String): Boolean;
399+
function IfEmpty(Str: String; WhenEmpty: String): String;
399400
function MessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): Integer; overload;
400401
function MessageDialog(const Title, Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; KeepAskingSetting: TAppSettingIndex=asUnused; FooterText: String=''): Integer; overload;
401402
function ErrorDialog(Msg: string): Integer; overload;
@@ -2365,6 +2366,13 @@ function IsNotEmpty(Str: String): Boolean;
23652366
Result := Str <> '';
23662367
end;
23672368

2369+
function IfEmpty(Str: String; WhenEmpty: String): String;
2370+
begin
2371+
if Str.IsEmpty then
2372+
Result := WhenEmpty
2373+
else
2374+
Result := Str;
2375+
end;
23682376

23692377
function MessageDialog(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons): Integer;
23702378
begin

source/main.pas

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3384,6 +3384,7 @@ procedure TMainForm.AfterQueryExecution(Thread: TQueryThread);
33843384
for i:=0 to NewTab.Results.ColumnCount-1 do begin
33853385
col := NewTab.Grid.Header.Columns.Add;
33863386
col.Text := NewTab.Results.ColumnNames[i];
3387+
col.Hint := _('Source table') + ': ' + IfEmpty(NewTab.Results.TableName(i), '-');
33873388
if NewTab.Results.DataType(i).Category in [dtcInteger, dtcReal] then
33883389
col.Alignment := taRightJustify;
33893390
if NewTab.Results.ColIsPrimaryKeyPart(i) then

0 commit comments

Comments
 (0)