]> git.saurik.com Git - wxWidgets.git/commitdiff
toolbars can be added inside windows, fix for relative pathnames
authorRoman Rolinsky <rolinsky@femagsoft.com>
Wed, 13 Jul 2005 14:34:05 +0000 (14:34 +0000)
committerRoman Rolinsky <rolinsky@femagsoft.com>
Wed, 13 Jul 2005 14:34:05 +0000 (14:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/tools/XRCed/xrced.py

index 730bf823bad7e148bcb7247021b3f3a4df4f3f60..1458535cecdbd535e8aa6ad8716a3f84866d9f1b 100644 (file)
@@ -361,7 +361,7 @@ class Frame(wxFrame):
         if evt.GetId() == wxID_SAVEAS or not self.dataFile:
             if self.dataFile: defaultName = ''
             else: defaultName = 'UNTITLED.xrc'
-            dirname = os.path.dirname(self.dataFile)
+            dirname = os.path.abspath(os.path.dirname(self.dataFile))
             dlg = wxFileDialog(self, 'Save As', dirname, defaultName, '*.xrc',
                                wxSAVE | wxOVERWRITE_PROMPT | wxCHANGE_DIR)
             if dlg.ShowModal() == wxID_OK:
@@ -456,7 +456,8 @@ class Frame(wxFrame):
             if parent.__class__ != xxxMainNode: error = True
         elif x.__class__ == xxxToolBar:
             # Toolbar can be top-level of child of panel or frame
-            if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame]: error = True
+            if parent.__class__ not in [xxxMainNode, xxxPanel, xxxFrame] and \
+               not parent.isSizer: error = True
         elif x.__class__ == xxxPanel and parent.__class__ == xxxMainNode:
             pass
         elif x.__class__ == xxxSpacer: