@@ -389,7 +389,7 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
389389
390390 if visualDataType == " table" then
391391 childNode = useParent :AddNode (istable (nodeValue ) and nodeValue .displayName or nodeKey )
392- childNode .Icon :SetImage (specialType && " icon16/folder_database.png " || " icon16/folder.png" )
392+ childNode .Icon :SetImage (" icon16/folder.png" )
393393
394394 childNode .oldExpand = childNode .SetExpanded
395395
@@ -432,13 +432,9 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
432432 childNode .oldExpand (... )
433433 end
434434
435- if varType == " SQLite.Schema" then
436- if nodeValue [" ID" ] or nodeValue [" Default" ] or nodeValue [" Not NULL" ] then -- TODO: Gotta be a better way to determine if this is a SQL table entry
437- childNode .Label :SetText (nodeValue .Name )
438- end
439- if nodeValue [" Primary Key" ] then
440- childNode .Icon :SetImage (" icon16/table_key.png" )
441- end
435+ local getModule = blobsProfiler .GetModule (varType )
436+ if getModule .FormatNodeIcon and getModule .FormatNodeIcon (luaState , nodeKey , nodeValue ) then
437+ childNode .Icon :SetImage (getModule .FormatNodeIcon (luaState , nodeKey , nodeValue ))
442438 end
443439 else
444440 local nodeText = nodeKey
@@ -450,6 +446,10 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
450446
451447 childNode = useParent :AddNode (nodeText )
452448 childNode .Icon :SetImage (" icon16/" .. (blobsProfiler .TypesToIcon [visualDataType ] || " page_white_text" ) .. " .png" )
449+
450+ if getModule .FormatNodeIcon and getModule .FormatNodeIcon (luaState , nodeKey , nodeValue ) then
451+ childNode .Icon :SetImage (getModule .FormatNodeIcon (luaState , nodeKey , nodeValue ))
452+ end
453453
454454 childNode .DoClick = function ()
455455 if isRoot && useParent == parentNode && varType == " Globals" then
@@ -631,20 +631,6 @@ local function addDTreeNode(parentNode, nodeData, specialType, isRoot, varType,
631631
632632 childNode .varType = varType
633633
634- if varType == " Profiling.Targets" and isRoot then
635- local fullModuleName = nodeData .key
636-
637- local getModule = blobsProfiler .GetModule (fullModuleName )
638- if getModule and getModule .Icon then
639- childNode .Icon :SetImage (getModule .Icon )
640- end
641- end
642-
643- local tblOverrides = blobsProfiler .GetIconOverrides (varType )
644- if tblOverrides and tblOverrides [dataType ] then
645- childNode .Icon :SetImage (tblOverrides [dataType ])
646- end
647-
648634 return childNode
649635end
650636
0 commit comments