Fixed weird close bug

This commit is contained in:
Christian Hammacher 2006-04-29 10:20:41 +00:00
parent d2b57d29fb
commit ddda9c9118
8 changed files with 16 additions and 17 deletions

View File

@ -115,7 +115,7 @@ AutoIncBuild=1
MajorVer=1 MajorVer=1
MinorVer=4 MinorVer=4
Release=2 Release=2
Build=8 Build=9
Debug=0 Debug=0
PreRelease=0 PreRelease=0
Special=0 Special=0
@ -126,7 +126,7 @@ CodePage=1252
[Version Info Keys] [Version Info Keys]
CompanyName=AMX Mod X Dev Team CompanyName=AMX Mod X Dev Team
FileDescription= FileDescription=
FileVersion=1.4.2.8 FileVersion=1.4.2.9
InternalName=gaben InternalName=gaben
LegalCopyright=AMX Mod X Dev Team LegalCopyright=AMX Mod X Dev Team
LegalTrademarks= LegalTrademarks=

Binary file not shown.

View File

@ -55,7 +55,7 @@ DetailsBtnText=&Details
PleaseWaitTitle=Information PleaseWaitTitle=Information
PleaseWaitText=Please wait a moment... PleaseWaitText=Please wait a moment...
MailSubject=bug report MailSubject=bug report
MailBody=please find the bug report attached MailBody=< report what you've done to raise this error >
SendBoxTitle=Sending bug report... SendBoxTitle=Sending bug report...
PrepareAttachMsg=Preparing attachments... PrepareAttachMsg=Preparing attachments...
MxLookupMsg=Searching for mail server... MxLookupMsg=Searching for mail server...

Binary file not shown.

View File

@ -125,8 +125,10 @@ end;
procedure TCodeExplorerUpdater.GetCode; procedure TCodeExplorerUpdater.GetCode;
begin begin
eCode.Assign(frmMain.sciEditor.Lines); if Assigned(ActiveDoc) then begin
eActive := ActiveDoc.Index; eCode.Assign(frmMain.sciEditor.Lines);
eActive := ActiveDoc.Index;
end;
end; end;
function GetNode(eText: string): TTreeNode; function GetNode(eText: string): TTreeNode;

View File

@ -1082,19 +1082,13 @@ begin
if ActiveDoc.Index = AIndex then if ActiveDoc.Index = AIndex then
ActiveDoc := nil; ActiveDoc := nil;
end; end;
Delete(AIndex); Delete(AIndex);
for i := 0 to Count -1 do
TDocument(Items[i]).Title := '< ' + IntToStr(i +1) + #32 + ExtractFileName(TDocument(Items[i]).FileName) + ' >';
if (Collection = Self) then begin for i := 0 to Count -1 do begin
try TDocument(Items[i]).Title := '< ' + IntToStr(i +1) + #32 + ExtractFileName(TDocument(Items[i]).FileName) + ' >';
for i := 0 to frmMain.tbDocs.Tabs.Count -1 do begin if (Collection = Self) and (Started) then begin
TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Caption := TDocument(Items[i]).Title; TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Caption := TDocument(Items[i]).Title;
TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Modified := TDocument(Items[i]).Modified; TJvTabBarItem(frmMain.tbDocs.Tabs[i]).Modified := TDocument(Items[i]).Modified;
end;
except
// no idea how to fix this
end; end;
end; end;

View File

@ -729,6 +729,7 @@ object frmMain: TfrmMain
Left = 0 Left = 0
Top = 72 Top = 72
Width = 880 Width = 880
RightClickSelect = False
Tabs = < Tabs = <
item item
Caption = '< 1 Untitled.sma >' Caption = '< 1 Untitled.sma >'

View File

@ -419,6 +419,8 @@ begin
pnlLoading.Top := tbDocs.Top + sciEditor.Top + ((sciEditor.Height * 5) div 6) - (pnlLoading.Height div 2); pnlLoading.Top := tbDocs.Top + sciEditor.Top + ((sciEditor.Height * 5) div 6) - (pnlLoading.Height div 2);
pnlLoading.BringToFront; pnlLoading.BringToFront;
if not Assigned(ActiveDoc) then exit;
if (Canvas.TextWidth(ActiveDoc.FileName) + 10 > mnuFilename.CustomWidth) then if (Canvas.TextWidth(ActiveDoc.FileName) + 10 > mnuFilename.CustomWidth) then
mnuFilename.Caption := ExtractFileName(ActiveDoc.FileName) mnuFilename.Caption := ExtractFileName(ActiveDoc.FileName)
else else
@ -3067,7 +3069,7 @@ begin
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
tbDocs.Tabs.Delete(tbDocs.Tabs.IndexOf(Item)); tbDocs.Tabs.Delete(Item.Index);
end; end;
Screen.Cursor := crDefault; Screen.Cursor := crDefault;
end; end;