Skip to content

Commit

Permalink
Simba: Fixed issues with Plugins in Function List.
Browse files Browse the repository at this point in the history
Plugins will now go in Plugins Section when loaded from any file.
Tried adding a fix for changing your defines count.
  • Loading branch information
JohnPeel committed Sep 24, 2013
1 parent 310a15d commit 4257bd7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Projects/Simba/framefunctionlist.pas
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ procedure TFunctionListFrame.FunctionListMouseDown(Sender: TObject;
exit;
end;
Self.DragKind := dkDrag;
if(Button = mbLeft) and (N.Level > 0)then
if ((Button = mbLeft) and (N.Level > 0) and (N.Parent <> PluginsNode)) then
Self.BeginDrag(False, 10);
DraggingNode := N;
end;
Expand Down Expand Up @@ -670,15 +670,23 @@ procedure TFillThread.Update;
AddProcsTree(ParentNode, Include.Items, Include.FileName);

for I := 0 to High(Include.Includes) do
AddInclude(ParentNode.Parent, Include.Includes[I]);
if (isLib(Include.Includes[I])) then
AddInclude(PluginsNode, Include.Includes[I])
else
AddInclude(ParentNode.Parent, Include.Includes[I]);
end;

function getCount(Analyzer: TCodeInsight): LongWord;
begin
Result := Length(Analyzer.Includes) + Analyzer.Lexer.Defines.Count;
end;

var
I: LongInt;
begin
AddProcsTree(ScriptNode, Analyzer.Items, Analyzer.FileName);

if (LastIncludeCount^ <> Length(Analyzer.Includes)) then
if (LastIncludeCount^ <> getCount(Analyzer)) then
begin
PluginsNode.DeleteChildren;
IncludesNode.DeleteChildren;
Expand All @@ -689,7 +697,7 @@ procedure TFillThread.Update;
else
AddInclude(IncludesNode, Analyzer.Includes[I]);

LastIncludeCount^ := Length(Analyzer.Includes);
LastIncludeCount^ := getCount(Analyzer);
end;
end;

Expand Down

0 comments on commit 4257bd7

Please sign in to comment.