]> git.saurik.com Git - wxWidgets.git/commitdiff
some more fixes: tree selection, replacing, wxYield calls removed
authorRoman Rolinsky <rolinsky@femagsoft.com>
Fri, 12 Aug 2005 14:40:20 +0000 (14:40 +0000)
committerRoman Rolinsky <rolinsky@femagsoft.com>
Fri, 12 Aug 2005 14:40:20 +0000 (14:40 +0000)
(produce infinite recursion)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/wx/tools/XRCed/CHANGES.txt
wxPython/wx/tools/XRCed/globals.py
wxPython/wx/tools/XRCed/tree.py
wxPython/wx/tools/XRCed/xrced.py

index 963d00880b21d8629c376150a42ab2c482b928a9..65d814885ecc65d17819f432a23a62329c0307b9 100644 (file)
@@ -1,3 +1,9 @@
+0.1.6-3
+-------
+
+Fix for crash when opening new file with active tree selection.
+Replacing controls bug fixed.
+
 0.1.6-2
 -------
 
index 43963047869b1f10f6c251087b527b9059a52005..c130ac2762824e3d4df0aea547cca6535bc45ac1 100644 (file)
@@ -15,7 +15,7 @@ import sys
 # Global constants
 
 progname = 'XRCed'
-version = '0.1.6-2'
+version = '0.1.6-3'
 # Can be changed to set other default encoding different
 #defaultEncoding = ''
 # you comment above and can uncomment this:
index 1d45918535df80b92437c128523b03541733d71b..55bbca94b5a8fa3f09b13fe158f07814eb45def4 100644 (file)
@@ -365,7 +365,7 @@ def SetMenu(m, list, shift=False):
             apply(m.Append, l)
         elif type(l) == types.ListType:
             subMenu = wxMenu()
-            SetMenu(subMenu, l[2:])
+            SetMenu(subMenu, l[2:], shift)
             m.AppendMenu(wxNewId(), l[0], subMenu, l[1])
         else:                           # separator
             m.AppendSeparator()
@@ -475,6 +475,8 @@ class XML_Tree(wxTreeCtrl):
 
     # Clear tree
     def Clear(self):
+        self.selection = None
+        self.UnselectAll()
         self.DeleteAllItems()
         # Add minimal structure
         if self.dom: self.dom.unlink()
@@ -487,11 +489,12 @@ class XML_Tree(wxTreeCtrl):
         self.root = self.AddRoot('XML tree', self.rootImage,
                                  data=wxTreeItemData(self.rootObj))
         self.SetItemHasChildren(self.root)
-        self.UnselectAll()
         self.Expand(self.root)
 
     # Clear old data and set new
     def SetData(self, dom):
+        self.selection = None
+        self.UnselectAll()
         self.DeleteAllItems()
         # Add minimal structure
         if self.dom: self.dom.unlink()
@@ -511,7 +514,6 @@ class XML_Tree(wxTreeCtrl):
                 self.mainNode.removeChild(node)
                 node.unlink()
         self.Expand(self.root)
-        self.UnselectAll()
 
     # Add tree item for given parent item if node is DOM element node with
     # object/object_ref tag. xxxParent is parent xxx object
@@ -766,7 +768,6 @@ class XML_Tree(wxTreeCtrl):
 #                return
 
         wxBeginBusyCursor()
-        wxYield()
         # Close old window, remember where it was
         highLight = None
         if testWin:
index 36c553a6e13c0863c938ec369c8c6532e8bc4fd0..04303b345dd66f948b45ed9f1486ada3c91731fd 100644 (file)
@@ -347,7 +347,6 @@ class Frame(wxFrame):
         if dlg.ShowModal() == wxID_OK:
             path = dlg.GetPath()
             self.SetStatusText('Loading...')
-            wxYield()
             wxBeginBusyCursor()
             try:
                 if self.Open(path):
@@ -375,7 +374,6 @@ class Frame(wxFrame):
         else:
             path = self.dataFile
         self.SetStatusText('Saving...')
-        wxYield()
         wxBeginBusyCursor()
         try:
             try:
@@ -594,7 +592,6 @@ class Frame(wxFrame):
             sizePanel = panel.GetSize()
             panel.Reparent(self.splitter)
             self.miniFrame.GetSizer().Remove(panel)
-            wxYield()
             # Widen
             self.SetDimensions(pos.x, pos.y, size.width + sizePanel.width, size.height)
             self.splitter.SplitVertically(tree, panel, conf.sashPos)
@@ -612,7 +609,6 @@ class Frame(wxFrame):
             self.miniFrame.Show(True)
             self.miniFrame.SetDimensions(conf.panelX, conf.panelY,
                                          conf.panelWidth, conf.panelHeight)
-            wxYield()
             # Reduce width
             self.SetDimensions(pos.x, pos.y,
                                max(size.width - sizePanel.width, self.minWidth), size.height)
@@ -932,7 +928,6 @@ Homepage: http://xrced.sourceforge.net\
                     self.SetStatusText('Refreshing test window...')
                     # (re)create
                     tree.CreateTestWin(g.testWin.item)
-                    wxYield()
                     self.SetStatusText('')
                 tree.needUpdate = False
         elif tree.pendingHighLight: