diff --git a/editor/studio/AMXX_Studio.dof b/editor/studio/AMXX_Studio.dof index b612c0e9..790bde20 100755 --- a/editor/studio/AMXX_Studio.dof +++ b/editor/studio/AMXX_Studio.dof @@ -115,7 +115,7 @@ AutoIncBuild=1 MajorVer=1 MinorVer=3 Release=0 -Build=17 +Build=21 Debug=0 PreRelease=0 Special=0 @@ -126,7 +126,7 @@ CodePage=1252 [Version Info Keys] CompanyName=AMX Mod X Dev Team FileDescription= -FileVersion=1.3.0.17 +FileVersion=1.3.0.21 InternalName= LegalCopyright= LegalTrademarks= diff --git a/editor/studio/AMXX_Studio.exe b/editor/studio/AMXX_Studio.exe index a3b93755..271b5fd6 100755 Binary files a/editor/studio/AMXX_Studio.exe and b/editor/studio/AMXX_Studio.exe differ diff --git a/editor/studio/AMXX_Studio.res b/editor/studio/AMXX_Studio.res index 62e3568f..0545d525 100755 Binary files a/editor/studio/AMXX_Studio.res and b/editor/studio/AMXX_Studio.res differ diff --git a/editor/studio/UnitCodeExplorerUpdater.pas b/editor/studio/UnitCodeExplorerUpdater.pas index 016c66d2..6c9389b5 100755 --- a/editor/studio/UnitCodeExplorerUpdater.pas +++ b/editor/studio/UnitCodeExplorerUpdater.pas @@ -155,7 +155,7 @@ var exConstants, exDefined, exIncluded, exMethods, exDefault, exEvents, eSelected: Integer; begin if Application.Terminated then exit; - if frmMain.trvExplorer.Items.Count = 0 then exit; + if (frmMain.trvExplorer.Items.Count = 0) or (eActive <> ActiveDoc.Index) then exit; if Assigned(frmMain.trvExplorer.Selected) then eSelected := frmMain.trvExplorer.Selected.AbsoluteIndex diff --git a/editor/studio/UnitMainTools.pas b/editor/studio/UnitMainTools.pas index 6fdc07a7..012800b2 100755 --- a/editor/studio/UnitMainTools.pas +++ b/editor/studio/UnitMainTools.pas @@ -19,6 +19,9 @@ type TDocument = class(TCollectionItem) FTitle: String; FModified: Boolean; FNotesText: String; + FAutoCompleteItems: String; + FKeywords: String; + FCallTips: String; procedure SetFileName(const Value: String); published property FileName: String read FFileName write SetFileName; @@ -31,6 +34,9 @@ type TDocument = class(TCollectionItem) property TopLine: Integer read FTopLine write FTopLine; property Modified: Boolean read FModified write FModified; property NotesText: String read FNotesText write FNotesText; + property Keywords: String read FKeywords write FKeywords; + property CallTips: String read FCallTips write FCallTips; + property AutoCompleteItems: String read FAutoCompleteItems write FAutoCompleteItems; public constructor Create(ACollection: TCollection; AHighlighter: String); reintroduce; destructor Destroy; reintroduce; @@ -963,6 +969,9 @@ begin ActiveDoc.TopLine := frmMain.sciEditor.GetFirstVisibleLine; ActiveDoc.Modified := frmMain.sciEditor.Modified; ActiveDoc.NotesText := GetRTFText(frmMain.rtfNotes); + ActiveDoc.Keywords := TSciKeywords(TSciLangItem(frmMain.sciEditor.LanguageManager.LanguageList.Find('Pawn').Keywords.Items[1])).Keywords.Text; + ActiveDoc.CallTips := frmMain.sciCallTips.ApiStrings.Text; + ActiveDoc.AutoCompleteItems := frmMain.sciAutoComplete.AStrings.Text; end; { Other } ActiveDoc := Document; // one global for save... @@ -983,6 +992,10 @@ begin frmMain.sciEditor.SetText(PChar(Document.Code)); SetRTFText(frmMain.rtfNotes, Document.NotesText); + TSciKeywords(TSciLangItem(frmMain.sciEditor.LanguageManager.LanguageList.Find('Pawn').Keywords.Items[1])).Keywords.Text := ActiveDoc.Keywords; + frmMain.sciCallTips.ApiStrings.Text := ActiveDoc.CallTips; + frmMain.sciAutoComplete.AStrings.Text := ActiveDoc.AutoCompleteItems; + frmMain.sciEditor.LanguageManager.Update; frmMain.sciEditor.ReadOnly := Document.ReadOnly; if Document.Modified then diff --git a/editor/studio/UnitfrmMain.pas b/editor/studio/UnitfrmMain.pas index 655e7af9..88e6b7de 100755 --- a/editor/studio/UnitfrmMain.pas +++ b/editor/studio/UnitfrmMain.pas @@ -1535,7 +1535,6 @@ begin exit; end; end; - eSavedFiles.Add(eItem.FileName); end; end; end; @@ -1560,7 +1559,6 @@ begin exit; end; end; - eSavedFiles.Add(eItem.FileName); end; end; end; @@ -1585,7 +1583,6 @@ begin exit; end; end; - eSavedFiles.Add(eItem.FileName); end; end; end; @@ -1601,21 +1598,20 @@ begin end else Application.Terminate; - - if eSavedFiles.Count = 0 then begin - for i := 0 to PawnProjects.Count - 1 do begin - if (not TDocument(PawnProjects.Items[i]).Untitled) then - eSavedFiles.Add(TDocument(PawnProjects.Items[i]).FileName); - end; - for i := 0 to CPPProjects.Count - 1 do begin - if (not TDocument(CPPProjects.Items[i]).Untitled) then - eSavedFiles.Add(TDocument(CPPProjects.Items[i]).FileName); - end; - for i := 0 to OtherProjects.Count - 1 do begin - if (not TDocument(OtherProjects.Items[i]).Untitled) then - eSavedFiles.Add(TDocument(OtherProjects.Items[i]).FileName); - end; + + for i := 0 to PawnProjects.Count - 1 do begin + if (not TDocument(PawnProjects.Items[i]).Untitled) then + eSavedFiles.Add(TDocument(PawnProjects.Items[i]).FileName); end; + for i := 0 to CPPProjects.Count - 1 do begin + if (not TDocument(CPPProjects.Items[i]).Untitled) then + eSavedFiles.Add(TDocument(CPPProjects.Items[i]).FileName); + end; + for i := 0 to OtherProjects.Count - 1 do begin + if (not TDocument(OtherProjects.Items[i]).Untitled) then + eSavedFiles.Add(TDocument(OtherProjects.Items[i]).FileName); + end; + eSavedFiles.SaveToFile(ExtractFilePath(ParamStr(0)) + 'config\Cache.cfg'); eSavedFiles.Free;