anchordocking: overwrite prompt when saving layout

git-svn-id: trunk@26202 -
This commit is contained in:
mattias 2010-06-20 11:12:05 +00:00
parent 1ee3d6dcf4
commit 4ac71dbe60
3 changed files with 36 additions and 2 deletions

1
.gitattributes vendored
View File

@ -2772,6 +2772,7 @@ examples/anchordocking/anchordockoptionsdlg.pas svneol=native#text/plain
examples/anchordocking/anchordockpkg.pas svneol=native#text/plain
examples/anchordocking/anchordockstorage.pas svneol=native#text/plain
examples/anchordocking/anchordockstr.pas svneol=native#text/plain
examples/anchordocking/design/ADLayoutDefault.xml svneol=native#text/plain
examples/anchordocking/design/anchordockingdsgn.lpk svneol=native#text/plain
examples/anchordocking/design/anchordockingdsgn.pas svneol=native#text/plain
examples/anchordocking/design/registeranchordocking.pas svneol=native#text/plain

View File

@ -0,0 +1,33 @@
<?xml version="1.0"?>
<CONFIG>
<MainConfig>
<Nodes ChildCount="1">
<Item1 Name="MainIDE" Type="CustomSite" ChildCount="1">
<Bounds Top="25" Width="1594" Height="1083"/>
<Item1 Name="AnchorDockSite1" Type="Layout" ChildCount="5">
<Bounds Top="67" Width="1594" Height="991"/>
<Anchors Align="Bottom"/>
<Item1 Name="SourceNotebook" Type="Control">
<Bounds Left="204" Width="1390" Height="881"/>
<Anchors Left="AnchorDockSplitter3" Bottom="AnchorDockSplitter2"/>
</Item1>
<Item2 Name="AnchorDockSplitter2" Type="SplitterHorizontal">
<Bounds Top="881" Left="204" Width="1390" Height="4"/>
<Anchors Left="AnchorDockSplitter3"/>
</Item2>
<Item3 Name="MessagesView" Type="Control">
<Bounds Top="885" Left="204" Width="1390" Height="106"/>
<Anchors Top="AnchorDockSplitter2" Left="AnchorDockSplitter3"/>
</Item3>
<Item4 Name="AnchorDockSplitter3" Type="SplitterVertical">
<Bounds Left="200" Width="4" Height="991"/>
</Item4>
<Item5 Name="ObjectInspectorDlg" Type="Control">
<Bounds Width="200" Height="991"/>
<Anchors Right="AnchorDockSplitter3"/>
</Item5>
</Item1>
</Item1>
</Nodes>
</MainConfig>
</CONFIG>

View File

@ -308,7 +308,7 @@ begin
SiteForm.BoundsRect:=NewBounds;
SiteForm.UndockWidth:=NewBounds.Right-NewBounds.Left;
SiteForm.UndockHeight:=NewBounds.Bottom-NewBounds.Top;
debugln(['TIDEAnchorDockMaster.ShowForm creator for ',DbgSName(AControl),' found: Left=',Creator.Left,' Top=',Creator.Top,' Width=',Creator.Width,' Height=',Creator.Height,' DockSiblingName=',DockSiblingName,' DockAlign=',dbgs(DockAlign)]);
debugln(['TIDEAnchorDockMaster.ShowForm creator for ',DbgSName(AControl),' found: Left=',Creator.Left,' Top=',Creator.Top,' Right=',Creator.Right,' Bottom=',Creator.Bottom,' DockSiblingName=',DockSiblingName,' DockAlign=',dbgs(DockAlign)]);
Site:=DockMaster.GetAnchorSite(SiteForm);
if (Site<>nil) and (DockSiblingName<>'') then begin
DockSibling:=Screen.FindForm(DockSiblingName);
@ -395,7 +395,7 @@ begin
try
InitIDEFileDialog(Dlg);
Dlg.Title:=adrsSaveWindowLayoutToFileXml;
Dlg.Options:=Dlg.Options+[ofPathMustExist,ofNoReadOnlyReturn];
Dlg.Options:=Dlg.Options+[ofPathMustExist,ofNoReadOnlyReturn,ofOverwritePrompt];
Dlg.Filter:=adrsAnchorDockingLayout+'|*.xml|'+adrsAllFiles+'|'+GetAllFilesMask;
if Dlg.Execute then begin
Filename:=CleanAndExpandFilename(Dlg.FileName);