mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 06:45:37 +03:00
fixed small bug in the documents bar
This commit is contained in:
parent
6f20664140
commit
99a2b54530
Binary file not shown.
@ -3057,6 +3057,7 @@ end;
|
|||||||
procedure TfrmMain.tbDocsTabClosing(Sender: TObject; Item: TJvTabBarItem;
|
procedure TfrmMain.tbDocsTabClosing(Sender: TObject; Item: TJvTabBarItem;
|
||||||
var AllowClose: Boolean);
|
var AllowClose: Boolean);
|
||||||
var Collection: TDocCollection;
|
var Collection: TDocCollection;
|
||||||
|
i: integer;
|
||||||
begin
|
begin
|
||||||
AllowClose := False;
|
AllowClose := False;
|
||||||
if (Started) and (Screen.Cursor = crDefault) and (not pnlLoading.Visible) then begin
|
if (Started) and (Screen.Cursor = crDefault) and (not pnlLoading.Visible) then begin
|
||||||
@ -3068,8 +3069,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if tbDocs.Tabs.IndexOf(Item) <> -1 then begin
|
if tbDocs.Tabs.IndexOf(Item) <> -1 then begin
|
||||||
if CloseDocument(TDocument(Collection.Items[tbDocs.Tabs.IndexOf(Item)]), True, False) then
|
if CloseDocument(TDocument(Collection.Items[tbDocs.Tabs.IndexOf(Item)]), True, False) then begin
|
||||||
tbDocs.Tabs.Delete(Item.Index);
|
tbDocs.Tabs.Delete(Item.Index);
|
||||||
|
|
||||||
|
for i := 0 to tbDocs.Tabs.Count -1 do
|
||||||
|
tbDocs.Tabs[i].Caption := TDocument(Collection.Items[i]).Title;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
Screen.Cursor := crDefault;
|
Screen.Cursor := crDefault;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user