mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 20:56:31 +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 BeginUpdate;
|
||||||
procedure EndUpdate;
|
procedure EndUpdate;
|
||||||
procedure DoChange(ForceUpdate: Boolean = False);
|
procedure DoChange(ForceUpdate: Boolean = False);
|
||||||
procedure IgnoreUpdate;
|
|
||||||
property UpdateLock: integer read FUpdateLock;
|
property UpdateLock: integer read FUpdateLock;
|
||||||
|
|
||||||
// items
|
// items
|
||||||
@ -2089,11 +2088,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TControlSelection.IgnoreUpdate;
|
|
||||||
begin
|
|
||||||
FStates := FStates - cssSelectionChangeFlags;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TControlSelection.DoChangeProperties;
|
procedure TControlSelection.DoChangeProperties;
|
||||||
begin
|
begin
|
||||||
if Assigned(OnPropertiesChanged) then OnPropertiesChanged(Self);
|
if Assigned(OnPropertiesChanged) then OnPropertiesChanged(Self);
|
||||||
|
@ -809,10 +809,7 @@ begin
|
|||||||
// was FinalizeFreeDesigner
|
// was FinalizeFreeDesigner
|
||||||
Include(FFlags, dfDestroyingForm);
|
Include(FFlags, dfDestroyingForm);
|
||||||
// free or hide the form
|
// free or hide the form
|
||||||
TheControlSelection.BeginUpdate;
|
|
||||||
TheFormEditor.DeleteComponent(FLookupRoot,AFreeComponent);
|
TheFormEditor.DeleteComponent(FLookupRoot,AFreeComponent);
|
||||||
TheControlSelection.IgnoreUpdate;
|
|
||||||
TheControlSelection.EndUpdate;
|
|
||||||
DisconnectComponent;
|
DisconnectComponent;
|
||||||
Free;
|
Free;
|
||||||
end;
|
end;
|
||||||
|
10
ide/main.pp
10
ide/main.pp
@ -8980,8 +8980,8 @@ begin
|
|||||||
{$IFDEF IDE_DEBUG}
|
{$IFDEF IDE_DEBUG}
|
||||||
debugln('[TMainIDE.OnControlSelectionChanged]');
|
debugln('[TMainIDE.OnControlSelectionChanged]');
|
||||||
{$ENDIF}
|
{$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 := TPersistentSelectionList.Create;
|
||||||
NewSelection.ForceUpdate := ForceUpdate;
|
NewSelection.ForceUpdate := ForceUpdate;
|
||||||
for i := 0 to TheControlSelection.Count - 1 do
|
for i := 0 to TheControlSelection.Count - 1 do
|
||||||
@ -8995,7 +8995,8 @@ end;
|
|||||||
|
|
||||||
procedure TMainIDE.OnControlSelectionPropsChanged(Sender: TObject);
|
procedure TMainIDE.OnControlSelectionPropsChanged(Sender: TObject);
|
||||||
begin
|
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.SaveChanges; // Save in any case, PropEditor value may have changed
|
||||||
ObjectInspector1.RefreshPropertyValues;
|
ObjectInspector1.RefreshPropertyValues;
|
||||||
end;
|
end;
|
||||||
@ -9003,7 +9004,8 @@ end;
|
|||||||
procedure TMainIDE.OnControlSelectionFormChanged(Sender: TObject; OldForm,
|
procedure TMainIDE.OnControlSelectionFormChanged(Sender: TObject; OldForm,
|
||||||
NewForm: TCustomForm);
|
NewForm: TCustomForm);
|
||||||
begin
|
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
|
if OldForm<>nil then
|
||||||
OldForm.Invalidate;
|
OldForm.Invalidate;
|
||||||
if TheControlSelection.LookupRoot<>nil then
|
if TheControlSelection.LookupRoot<>nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user