]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/tools/XRCed/xrced.py
implemented locating objects in gridbag sizer,
[wxWidgets.git] / wxPython / wx / tools / XRCed / xrced.py
index 9da4ce74fea38c964b54a8769c9855efba1a87ca..ddf9add60a899030451af2f48b1b4a2fba6d304b 100644 (file)
@@ -679,7 +679,7 @@ class Frame(wxFrame):
         # We simply perform depth-first traversal, sinse it's too much
         # hassle to deal with all sizer/window combinations
         w = tree.FindNodeObject(item)
-        if w == obj:
+        if w == obj or isinstance(w, wxGBSizerItem) and w.GetWindow() == obj:
             return item
         if tree.ItemHasChildren(item):
             child = tree.GetFirstChild(item)[0]
@@ -695,6 +695,7 @@ class Frame(wxFrame):
         g.testWin.Disconnect(wxID_ANY, wxID_ANY, wxEVT_LEFT_DOWN)
         item = self.FindObject(g.testWin.item, evt.GetEventObject())
         if item:
+            tree.EnsureVisible(item)
             tree.SelectItem(item)
         self.tb.ToggleTool(self.ID_TOOL_LOCATE, False)
         if item: