mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 03:01:07 +08:00
Display small overlay icons for lntTable items with some special table engines like federated, csv, aria and performance_schema. Fixes issue #3014.
This commit is contained in:
@ -23,6 +23,7 @@ type
|
||||
FConnection: TDBConnection;
|
||||
function GetObjType: String;
|
||||
function GetImageIndex: Integer;
|
||||
function GetOverlayImageIndex: Integer;
|
||||
function GetCreateCode: String;
|
||||
procedure SetCreateCode(Value: String);
|
||||
public
|
||||
@ -38,6 +39,7 @@ type
|
||||
function QuotedColumn(AlwaysQuote: Boolean=True): String;
|
||||
property ObjType: String read GetObjType;
|
||||
property ImageIndex: Integer read GetImageIndex;
|
||||
property OverlayImageIndex: Integer read GetOverlayImageIndex;
|
||||
property CreateCode: String read GetCreateCode write SetCreateCode;
|
||||
property Connection: TDBConnection read FConnection;
|
||||
end;
|
||||
@ -4882,6 +4884,41 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function TDBObject.GetOverlayImageIndex: Integer;
|
||||
var
|
||||
EngineUpper: String;
|
||||
begin
|
||||
// Detect small overlay icon index for specified table engine
|
||||
Result := -1;
|
||||
case NodeType of
|
||||
lntNone: begin
|
||||
if not Connection.Active then
|
||||
Result := 158;
|
||||
end;
|
||||
|
||||
lntDb: begin
|
||||
if Database = Connection.Database then
|
||||
Result := ICONINDEX_HIGHLIGHTMARKER;
|
||||
end;
|
||||
|
||||
lntTable: begin
|
||||
EngineUpper := UpperCase(Engine);
|
||||
if EngineUpper = 'FEDERATED' then
|
||||
Result := 177
|
||||
else if EngineUpper = 'MEMORY' then
|
||||
Result := 178
|
||||
else if EngineUpper = 'ARIA' then
|
||||
Result := 179
|
||||
else if EngineUpper = 'CSV' then
|
||||
Result := 180
|
||||
else if EngineUpper = 'PERFORMANCE_SCHEMA' then
|
||||
Result := 181;
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
function TDBObject.GetCreateCode: String;
|
||||
begin
|
||||
if not FCreateCodeFetched then try
|
||||
|
Reference in New Issue
Block a user