← Back to team overview

mlhim-specs-dev team mailing list archive

[Branch ~cdd-dev/cdd/trunk] Rev 302: Fix in class Party

 

------------------------------------------------------------
revno: 302
committer: Eduardo Ribeiro <xcesar@xxxxxxxxx>
branch nick: devel
timestamp: Tue 2013-01-22 12:36:31 -0200
message:
  Fix in class Party
modified:
  src/2.0/cdd.py


--
lp:cdd
https://code.launchpad.net/~cdd-dev/cdd/trunk

Your team MLHIM Specifications Developers is subscribed to branch lp:cdd.
To unsubscribe from this branch go to https://code.launchpad.net/~cdd-dev/cdd/trunk/+edit-subscription
=== modified file 'src/2.0/cdd.py'
--- src/2.0/cdd.py	2013-01-22 02:59:18 +0000
+++ src/2.0/cdd.py	2013-01-22 14:36:31 +0000
@@ -348,6 +348,18 @@
         top_panel.set_item_index(i)
         tree.Expand(item)
 
+    def evt_delete(self):
+        tree_selected = self.tree.GetSelection()
+
+        child, cookie = self.tree.GetFirstChild(tree_selected)
+        while child.IsOk():
+            txt = self.tree.GetItemText(child)
+            if txt.endswith(self.suffix):
+                self.tree.Delete(child)
+                return
+
+            child, cookie = self.tree.GetNextChild(tree_selected, cookie)
+
 # end of class Party
 
 class CareEntry(cdd_gui.CareEntry):