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

View File

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