mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 08:50:16 +02:00
IDE: disconnect source editor before rename
git-svn-id: trunk@26196 -
This commit is contained in:
parent
0238049950
commit
13fdb2e797
@ -706,7 +706,7 @@ begin
|
||||
if ALayout.Applied then exit;
|
||||
ALayout.Applied:=true;
|
||||
{$IFDEF VerboseIDEDocking}
|
||||
debugln(['TSimpleWindowLayoutList.ApplyAndShow restore ',ALayout.FormID]);
|
||||
debugln(['TSimpleWindowLayoutList.ApplyAndShow restore ',ALayout.FormID,' ',IDEWindowPlacementNames[ALayout.WindowPlacement]]);
|
||||
{$ENDIF}
|
||||
|
||||
case ALayout.WindowPlacement of
|
||||
@ -753,6 +753,8 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
debugln(['TSimpleWindowLayoutList.ApplyAndShow no layout found ',ALayout<>nil,' ',DbgSName(AForm)]);
|
||||
|
||||
// no layout found => use default
|
||||
Creator:=IDEWindowCreators.FindWithName(AForm.Name);
|
||||
if Creator<>nil then
|
||||
|
@ -5672,12 +5672,18 @@ Begin
|
||||
End;
|
||||
|
||||
procedure TSourceNotebook.DoClose(var CloseAction: TCloseAction);
|
||||
var
|
||||
Layout: TSimpleWindowLayout;
|
||||
begin
|
||||
inherited DoClose(CloseAction);
|
||||
CloseAction := caHide;
|
||||
{$IFnDEF SingleSrcWindow}
|
||||
if PageCount = 0 then begin { $NOTE maybe keep the last one}
|
||||
// Make the name unique, because it may not immediately be released
|
||||
// disconnect first
|
||||
Layout:=EnvironmentOptions.IDEWindowLayoutList.ItemByForm(Self);
|
||||
if Layout<>nil then
|
||||
Layout.Form:=nil;
|
||||
Name := Name + '___' + IntToStr(PtrUInt(Pointer(Self)));
|
||||
CloseAction := caFree;
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user