dabo Commit
Revision 6249
Date: 2010-12-16 13:23:43 -0800 (Thu, 16 Dec 2010)
Author: Jacekk
Trac: http://trac.dabodev.com/changeset/6249
Changed:
U trunk/dabo/ui/dialogs/PreferenceDialog.py
Log:
Fixes for None node issue and missing 'hotkey' attribute in submenus.
Diff:
Modified: trunk/dabo/ui/dialogs/PreferenceDialog.py
===================================================================
--- trunk/dabo/ui/dialogs/PreferenceDialog.py 2010-12-16 08:56:11 UTC (rev
6248)
+++ trunk/dabo/ui/dialogs/PreferenceDialog.py 2010-12-16 21:23:43 UTC (rev
6249)
@@ -189,6 +189,7 @@
kidnode = nd.appendChild(cap)
subpref = pref.get(prefcap)
kidnode.pref = subpref
+ kidnode.hotkey = "n/a"
if itm.Children:
self._recurseMenu(itm, kidnode, subpref)
else:
@@ -202,12 +203,13 @@
def _onMenuTreeSelection(self, evt):
self._selectedItem = nd = evt.selectedNode
- if nd.IsRootNode:
- return
- if nd.hotkey == "n/a":
- self.txtMenuCurrentHotKey.Value = ""
- else:
- self.txtMenuCurrentHotKey.Value = nd.hotkey
+ if nd:
+ if nd.IsRootNode:
+ return
+ if nd.hotkey == "n/a":
+ self.txtMenuCurrentHotKey.Value = ""
+ else:
+ self.txtMenuCurrentHotKey.Value = nd.hotkey
self.update()
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]