mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 18:58:15 +02:00
IDE: Update OI properly when closing a project. Issue #31153.
git-svn-id: trunk@53764 -
This commit is contained in:
parent
52ab6a0253
commit
8ed63aff69
@ -397,7 +397,6 @@ type
|
||||
procedure BeginUpdate;
|
||||
procedure EndUpdate;
|
||||
procedure DoChange(ForceUpdate: Boolean = False);
|
||||
procedure IgnoreUpdate;
|
||||
property UpdateLock: integer read FUpdateLock;
|
||||
|
||||
// items
|
||||
@ -2089,11 +2088,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TControlSelection.IgnoreUpdate;
|
||||
begin
|
||||
FStates := FStates - cssSelectionChangeFlags;
|
||||
end;
|
||||
|
||||
procedure TControlSelection.DoChangeProperties;
|
||||
begin
|
||||
if Assigned(OnPropertiesChanged) then OnPropertiesChanged(Self);
|
||||
|
@ -809,10 +809,7 @@ begin
|
||||
// was FinalizeFreeDesigner
|
||||
Include(FFlags, dfDestroyingForm);
|
||||
// free or hide the form
|
||||
TheControlSelection.BeginUpdate;
|
||||
TheFormEditor.DeleteComponent(FLookupRoot,AFreeComponent);
|
||||
TheControlSelection.IgnoreUpdate;
|
||||
TheControlSelection.EndUpdate;
|
||||
DisconnectComponent;
|
||||
Free;
|
||||
end;
|
||||
|
10
ide/main.pp
10
ide/main.pp
@ -8980,8 +8980,8 @@ begin
|
||||
{$IFDEF IDE_DEBUG}
|
||||
debugln('[TMainIDE.OnControlSelectionChanged]');
|
||||
{$ENDIF}
|
||||
if (TheControlSelection = nil) or (FormEditor1 = nil) then Exit;
|
||||
|
||||
Assert(Assigned(TheControlSelection), 'TMainIDE.OnControlSelectionChanged: TheControlSelection=Nil.');
|
||||
if FormEditor1 = nil then Exit;
|
||||
NewSelection := TPersistentSelectionList.Create;
|
||||
NewSelection.ForceUpdate := ForceUpdate;
|
||||
for i := 0 to TheControlSelection.Count - 1 do
|
||||
@ -8995,7 +8995,8 @@ end;
|
||||
|
||||
procedure TMainIDE.OnControlSelectionPropsChanged(Sender: TObject);
|
||||
begin
|
||||
if (TheControlSelection=nil) or (FormEditor1=nil) or (ObjectInspector1=nil) then exit;
|
||||
Assert(Assigned(TheControlSelection), 'TMainIDE.OnControlSelectionPropsChanged: TheControlSelection=Nil.');
|
||||
if (FormEditor1=nil) or (ObjectInspector1=nil) then exit;
|
||||
ObjectInspector1.SaveChanges; // Save in any case, PropEditor value may have changed
|
||||
ObjectInspector1.RefreshPropertyValues;
|
||||
end;
|
||||
@ -9003,7 +9004,8 @@ end;
|
||||
procedure TMainIDE.OnControlSelectionFormChanged(Sender: TObject; OldForm,
|
||||
NewForm: TCustomForm);
|
||||
begin
|
||||
if (TheControlSelection=nil) or (FormEditor1=nil) then exit;
|
||||
Assert(Assigned(TheControlSelection), 'TMainIDE.OnControlSelectionFormChanged: TheControlSelection=Nil.');
|
||||
if FormEditor1=nil then exit;
|
||||
if OldForm<>nil then
|
||||
OldForm.Invalidate;
|
||||
if TheControlSelection.LookupRoot<>nil then
|
||||
|
Loading…
Reference in New Issue
Block a user