Browse Source

CH: bug fix on tab close... function had to be cleared for the last item remaining

Jean-Francois Goulet 20 years ago
parent
commit
2a1de7eb1e
3 changed files with 16 additions and 2 deletions
  1. 2 2
      LuaEdit/LuaEdit.dof
  2. BIN
      LuaEdit/LuaEdit.res
  3. 14 0
      LuaEdit/Main.pas

+ 2 - 2
LuaEdit/LuaEdit.dof

@@ -115,7 +115,7 @@ AutoIncBuild=1
 MajorVer=2
 MinorVer=0
 Release=1
-Build=612
+Build=613
 Debug=0
 PreRelease=0
 Special=0
@@ -126,7 +126,7 @@ CodePage=1252
 [Version Info Keys]
 CompanyName=Open Source
 FileDescription=IDE for Lua 5.0.2
-FileVersion=2.0.1.612
+FileVersion=2.0.1.613
 InternalName=LuaEdit
 LegalCopyright=LuaEdit Copyright 2004-2005 ©
 LegalTrademarks=

BIN
LuaEdit/LuaEdit.res


+ 14 - 0
LuaEdit/Main.pas

@@ -6651,6 +6651,8 @@ begin
 end;
 
 procedure TfrmMain.jvUnitBarTabClosing(Sender: TObject; Item: TJvTabBarItem; var AllowClose: Boolean);
+var
+  x: Integer;
 begin
   if Assigned(Item) then
   begin
@@ -6664,6 +6666,18 @@ begin
         CheckButtons;
         frmProjectTree.BuildProjectTree;
         frmBreakpoints.RefreshBreakpointList;
+
+        if Assigned(jvUnitBar.SelectedTab) then
+        begin
+          if jvUnitBar.Tabs.Count = 1 then
+          begin
+            // Free previously created TFctInfo objects...
+            for x := 0 to frmFunctionList.lvwFunctions.Items.Count - 1 do
+              TFctInfo(frmFunctionList.lvwFunctions.Items[x].Data).Free;
+
+            frmFunctionList.lvwFunctions.Clear;
+          end;
+        end;
       end;
     end;
   end;