dabo Commit
Revision 4325
Date: 2008-07-30 09:52:50 -0700 (Wed, 30 Jul 2008)
Author: Nate
Trac: http://svn.dabodev.com/trac/dabo/changeset/4325

Changed:
U   trunk/ide/ClassDesignerControlMixin.py

Log:
I ran into a class designer error where I deleted the root node in a dTreeView, 
and then right clicked on the context menu.  The CD didn't like there being no 
nodes in the tree, so I changed it to where the delete this node option isn't 
available in the context menu if root is selected.  Are you supposed to be able 
to delete a root node?  If so, we will just have to add some special case code 
to check for no nodes and offer an add root option.

Diff:
Modified: trunk/ide/ClassDesignerControlMixin.py
===================================================================
--- trunk/ide/ClassDesignerControlMixin.py      2008-07-30 16:40:02 UTC (rev 
4324)
+++ trunk/ide/ClassDesignerControlMixin.py      2008-07-30 16:52:50 UTC (rev 
4325)
@@ -332,7 +332,8 @@
                        if not self.Editable:
                                pop.append(_("Change Node Caption"), 
                                                OnHit=self.onChangeCaption)
-                       pop.append(_("Delete this node"), OnHit=self.onDelNode)
+                       if not self.activeNode.IsRootNode:
+                               pop.append(_("Delete this node"), 
OnHit=self.onDelNode)
                elif isinstance(self, (dabo.ui.dLabel, dabo.ui.dButton, 
dabo.ui.dCheckBox,
                                dabo.ui.dBitmapButton, dabo.ui.dToggleButton, 
dabo.ui.dPage, 
                                dabo.ui.dColumn, dlgs.WizardPage)):




_______________________________________________
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]

Reply via email to