mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-11 12:00:37 +01:00
IDE: updating all IsVisibleTab after new project/open project, bug #16971
git-svn-id: trunk@26727 -
This commit is contained in:
parent
e43725d758
commit
2f1d1e7d1e
@ -9642,13 +9642,11 @@ begin
|
||||
|
||||
Result:=mrOk;
|
||||
finally
|
||||
//SrcEdit:=SourceEditorManager.act
|
||||
//Project1.UpdateVisibleUnit(SourceEditorManager);
|
||||
// set all modified to false
|
||||
Project1.UpdateAllVisibleUnits;
|
||||
for i:=0 to Project1.UnitCount-1 do
|
||||
Project1.Units[i].ClearModifieds;
|
||||
Project1.Modified:=false;
|
||||
debugln(['TMainIDE.DoNewProject AAA1 ',SomethingOfProjectIsModified]);
|
||||
// call handlers
|
||||
HandlerResult:=DoCallProjectChangedHandler(lihtProjectOpened,Project1);
|
||||
if not (HandlerResult in [mrOk,mrCancel,mrAbort]) then
|
||||
@ -10015,6 +10013,7 @@ begin
|
||||
end;
|
||||
|
||||
// set all modified to false
|
||||
Project1.UpdateAllVisibleUnits;
|
||||
Project1.ClearModifieds(true);
|
||||
|
||||
IncreaseCompilerParseStamp;
|
||||
|
||||
@ -831,6 +831,7 @@ type
|
||||
procedure RemoveNonExistingFiles(RemoveFromUsesSection: boolean = true);
|
||||
function CreateProjectFile(const Filename: string): TLazProjectFile; override;
|
||||
procedure UpdateVisibleUnit(AnEditor: TSourceEditorInterface; AWindowIndex: Integer);
|
||||
procedure UpdateAllVisibleUnits;
|
||||
procedure MoveUnitWindowIndex(OldIndex, NewIndex: Integer);
|
||||
// search
|
||||
function IndexOf(AUnitInfo: TUnitInfo): integer;
|
||||
@ -3358,6 +3359,21 @@ begin
|
||||
EditorInfo[i].IsVisibleTab := EditorInfo[i].EditorComponent = AnEditor;
|
||||
end;
|
||||
|
||||
procedure TProject.UpdateAllVisibleUnits;
|
||||
var
|
||||
i: Integer;
|
||||
aWndId: LongInt;
|
||||
Info: TUnitEditorInfo;
|
||||
begin
|
||||
for i := 0 to EditorInfoCount - 1 do begin
|
||||
Info:=EditorInfo[i];
|
||||
aWndId:=Info.WindowIndex;
|
||||
Info.IsVisibleTab := (aWndId>=0)
|
||||
and (aWndId<SourceEditorManagerIntf.SourceWindowCount)
|
||||
and (Info.EditorComponent = SourceEditorManagerIntf.SourceWindows[aWndId].ActiveEditor);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TProject.MoveUnitWindowIndex(OldIndex, NewIndex: Integer);
|
||||
var
|
||||
i: Integer;
|
||||
|
||||
@ -203,7 +203,8 @@ type
|
||||
end;
|
||||
|
||||
{ TSourceEditor ---
|
||||
TSourceEditor is the class that controls access for the Editor. }
|
||||
TSourceEditor is the class that controls access for a single source editor,
|
||||
which is part of TSourceNotebook. }
|
||||
|
||||
TSourceEditor = class(TSourceEditorInterface)
|
||||
private
|
||||
|
||||
Loading…
Reference in New Issue
Block a user