Updates for doc/view from Morgan Hua

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32496 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2005-02-28 20:16:34 +00:00
parent 9314633b78
commit 74b8945829
4 changed files with 207 additions and 148 deletions

View File

@@ -1318,7 +1318,7 @@ class DocManager(wx.EvtHandler):
"""
Creates a new document and reads in the selected file.
"""
if not self.CreateDocument('', 0):
if not self.CreateDocument('', DEFAULT_DOCMAN_FLAGS):
self.OnOpenFileFailure()
@@ -1709,6 +1709,11 @@ class DocManager(wx.EvtHandler):
else:
return None
if path and flags & DOC_SILENT:
temp = self.FindTemplateForPath(path)
else:
temp, path = self.SelectDocumentPath(templates, path, flags)
# Existing document
if self.GetFlags() & DOC_OPEN_ONCE:
for document in self._docs:
@@ -1720,11 +1725,6 @@ class DocManager(wx.EvtHandler):
firstView.GetFrame().Iconize(False)
return None
if flags & DOC_SILENT:
temp = self.FindTemplateForPath(path)
else:
temp, path = self.SelectDocumentPath(templates, path, flags)
if temp:
newDoc = temp.CreateDocument(path, flags)
if newDoc: