mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 14:25:38 +03:00
Small bugfix, added another feature (saves now the last keywords)
This commit is contained in:
parent
1cb99082e2
commit
a66f13fc91
@ -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=
|
||||
|
Binary file not shown.
Binary file not shown.
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user