mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 07:42:59 +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;
|
if ALayout.Applied then exit;
|
||||||
ALayout.Applied:=true;
|
ALayout.Applied:=true;
|
||||||
{$IFDEF VerboseIDEDocking}
|
{$IFDEF VerboseIDEDocking}
|
||||||
debugln(['TSimpleWindowLayoutList.ApplyAndShow restore ',ALayout.FormID]);
|
debugln(['TSimpleWindowLayoutList.ApplyAndShow restore ',ALayout.FormID,' ',IDEWindowPlacementNames[ALayout.WindowPlacement]]);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
case ALayout.WindowPlacement of
|
case ALayout.WindowPlacement of
|
||||||
@ -753,6 +753,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
debugln(['TSimpleWindowLayoutList.ApplyAndShow no layout found ',ALayout<>nil,' ',DbgSName(AForm)]);
|
||||||
|
|
||||||
// no layout found => use default
|
// no layout found => use default
|
||||||
Creator:=IDEWindowCreators.FindWithName(AForm.Name);
|
Creator:=IDEWindowCreators.FindWithName(AForm.Name);
|
||||||
if Creator<>nil then
|
if Creator<>nil then
|
||||||
|
@ -5672,12 +5672,18 @@ Begin
|
|||||||
End;
|
End;
|
||||||
|
|
||||||
procedure TSourceNotebook.DoClose(var CloseAction: TCloseAction);
|
procedure TSourceNotebook.DoClose(var CloseAction: TCloseAction);
|
||||||
|
var
|
||||||
|
Layout: TSimpleWindowLayout;
|
||||||
begin
|
begin
|
||||||
inherited DoClose(CloseAction);
|
inherited DoClose(CloseAction);
|
||||||
CloseAction := caHide;
|
CloseAction := caHide;
|
||||||
{$IFnDEF SingleSrcWindow}
|
{$IFnDEF SingleSrcWindow}
|
||||||
if PageCount = 0 then begin { $NOTE maybe keep the last one}
|
if PageCount = 0 then begin { $NOTE maybe keep the last one}
|
||||||
// Make the name unique, because it may not immediately be released
|
// 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)));
|
Name := Name + '___' + IntToStr(PtrUInt(Pointer(Self)));
|
||||||
CloseAction := caFree;
|
CloseAction := caFree;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user