IDE: disconnect source editor before rename

git-svn-id: trunk@26196 -
This commit is contained in:
mattias 2010-06-19 16:03:45 +00:00
parent 0238049950
commit 13fdb2e797
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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