Fixed weird close bug
This commit is contained in:
parent
d2b57d29fb
commit
ddda9c9118
|
@ -115,7 +115,7 @@ AutoIncBuild=1
|
|||
MajorVer=1
|
||||
MinorVer=4
|
||||
Release=2
|
||||
Build=8
|
||||
Build=9
|
||||
Debug=0
|
||||
PreRelease=0
|
||||
Special=0
|
||||
|
@ -126,7 +126,7 @@ CodePage=1252
|
|||
[Version Info Keys]
|
||||
CompanyName=AMX Mod X Dev Team
|
||||
FileDescription=
|
||||
FileVersion=1.4.2.8
|
||||
FileVersion=1.4.2.9
|
||||
InternalName=gaben
|
||||
LegalCopyright=AMX Mod X Dev Team
|
||||
LegalTrademarks=
|
||||
|
|
Binary file not shown.
|
@ -55,7 +55,7 @@ DetailsBtnText=&Details
|
|||
PleaseWaitTitle=Information
|
||||
PleaseWaitText=Please wait a moment...
|
||||
MailSubject=bug report
|
||||
MailBody=please find the bug report attached
|
||||
MailBody=< report what you've done to raise this error >
|
||||
SendBoxTitle=Sending bug report...
|
||||
PrepareAttachMsg=Preparing attachments...
|
||||
MxLookupMsg=Searching for mail server...
|
||||
|
|
Binary file not shown.
|
@ -125,8 +125,10 @@ end;
|
|||
|
||||
procedure TCodeExplorerUpdater.GetCode;
|
||||
begin
|
||||
eCode.Assign(frmMain.sciEditor.Lines);
|
||||
eActive := ActiveDoc.Index;
|
||||
if Assigned(ActiveDoc) then begin
|
||||
eCode.Assign(frmMain.sciEditor.Lines);
|
||||
eActive := ActiveDoc.Index;
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetNode(eText: string): TTreeNode;
|
||||
|
|
|
@ -1082,19 +1082,13 @@ begin
|
|||
if ActiveDoc.Index = AIndex then
|
||||
ActiveDoc := nil;
|
||||
end;
|
||||
|
||||
Delete(AIndex);
|
||||
for i := 0 to Count -1 do
|
||||
|
||||
for i := 0 to Count -1 do begin
|
||||
TDocument(Items[i]).Title := '< ' + IntToStr(i +1) + #32 + ExtractFileName(TDocument(Items[i]).FileName) + ' >';
|
||||
|
||||
if (Collection = Self) then begin
|
||||
try
|
||||
for i := 0 to frmMain.tbDocs.Tabs.Count -1 do begin
|
||||
TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Caption := TDocument(Items[i]).Title;
|
||||
TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Modified := TDocument(Items[i]).Modified;
|
||||
end;
|
||||
except
|
||||
// no idea how to fix this
|
||||
if (Collection = Self) and (Started) then begin
|
||||
TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Caption := TDocument(Items[i]).Title;
|
||||
TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Modified := TDocument(Items[i]).Modified;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
|
|
@ -729,6 +729,7 @@ object frmMain: TfrmMain
|
|||
Left = 0
|
||||
Top = 72
|
||||
Width = 880
|
||||
RightClickSelect = False
|
||||
Tabs = <
|
||||
item
|
||||
Caption = '< 1 Untitled.sma >'
|
||||
|
|
|
@ -419,6 +419,8 @@ begin
|
|||
pnlLoading.Top := tbDocs.Top + sciEditor.Top + ((sciEditor.Height * 5) div 6) - (pnlLoading.Height div 2);
|
||||
pnlLoading.BringToFront;
|
||||
|
||||
if not Assigned(ActiveDoc) then exit;
|
||||
|
||||
if (Canvas.TextWidth(ActiveDoc.FileName) + 10 > mnuFilename.CustomWidth) then
|
||||
mnuFilename.Caption := ExtractFileName(ActiveDoc.FileName)
|
||||
else
|
||||
|
@ -3067,7 +3069,7 @@ begin
|
|||
|
||||
if tbDocs.Tabs.IndexOf(Item) <> -1 then begin
|
||||
if CloseDocument(TDocument(Collection.Items[tbDocs.Tabs.IndexOf(Item)]), True, False) then
|
||||
tbDocs.Tabs.Delete(tbDocs.Tabs.IndexOf(Item));
|
||||
tbDocs.Tabs.Delete(Item.Index);
|
||||
end;
|
||||
Screen.Cursor := crDefault;
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue
Block a user