This commit is contained in:
Martin 2024-09-24 23:37:18 +02:00
parent 77c4b7ceae
commit 54b57dc2fb

View File

@ -308,7 +308,7 @@ type
fSourceChangeStep: LongInt; fSourceChangeStep: LongInt;
FSourceDirectoryReferenced: boolean; FSourceDirectoryReferenced: boolean;
fLastDirectoryReferenced: string; fLastDirectoryReferenced: string;
FSetBookmarLock: Integer; FSetBookmarkLock: Integer;
FUnitResourceFileformat: TUnitResourcefileFormatClass; FUnitResourceFileformat: TUnitResourcefileFormatClass;
function ComponentLFMOnDiskHasChanged: boolean; function ComponentLFMOnDiskHasChanged: boolean;
@ -1768,7 +1768,7 @@ end;
procedure TUnitInfo.Clear; procedure TUnitInfo.Clear;
begin begin
FBookmarks.Clear; FBookmarks.Clear;
FSetBookmarLock := 0; FSetBookmarkLock := 0;
BuildFileIfActive:=false; BuildFileIfActive:=false;
fComponent := nil; fComponent := nil;
fComponentName := ''; fComponentName := '';
@ -2088,7 +2088,7 @@ begin
if Assigned(Project1) and Assigned(Project1.Bookmarks) then if Assigned(Project1) and Assigned(Project1.Bookmarks) then
begin begin
if OpenEditorInfoCount > 0 then begin if OpenEditorInfoCount > 0 then begin
inc(FSetBookmarLock); inc(FSetBookmarkLock);
try try
// Adjust bookmarks // Adjust bookmarks
for i := Bookmarks.Count-1 downto 0 do for i := Bookmarks.Count-1 downto 0 do
@ -2099,7 +2099,7 @@ begin
OpenEditorInfo[0].EditorComponent.SetBookMark(BM.ID, BM.CursorPos.X, BM.CursorPos.Y, BM.Left, BM.Top); OpenEditorInfo[0].EditorComponent.SetBookMark(BM.ID, BM.CursorPos.X, BM.CursorPos.Y, BM.Left, BM.Top);
end; end;
finally finally
dec(FSetBookmarLock); dec(FSetBookmarkLock);
end; end;
end end
else // OpenEditorInfoCount = 0 else // OpenEditorInfoCount = 0
@ -2432,7 +2432,7 @@ end;
function TUnitInfo.AddBookmark(X, Y, ID: integer): integer; function TUnitInfo.AddBookmark(X, Y, ID: integer): integer;
begin begin
if FSetBookmarLock = 0 then if FSetBookmarkLock = 0 then
Result := Bookmarks.Add(X, Y, ID) Result := Bookmarks.Add(X, Y, ID)
else else
Result := -1; Result := -1;
@ -2442,7 +2442,7 @@ end;
function TUnitInfo.AddBookmark(X, Y, ALeft, ATop, ID: integer): integer; function TUnitInfo.AddBookmark(X, Y, ALeft, ATop, ID: integer): integer;
begin begin
if FSetBookmarLock = 0 then if FSetBookmarkLock = 0 then
Result := Bookmarks.Add(X, Y, ALeft, ATop, ID) Result := Bookmarks.Add(X, Y, ALeft, ATop, ID)
else else
Result := -1; Result := -1;