No need to crash, just warn, on dup nodes

svn: r15684
This commit is contained in:
Doug Blank 2010-08-08 13:15:36 +00:00
parent 691a52295f
commit c15fdb15c4

View File

@ -102,7 +102,7 @@ class Node(object):
if not self.handle:
self.handle = handle
else:
raise ValueError, 'attempt to add twice a node to the model'
print 'WARNING: attempt to add twice a node to the model'
def add_child(self, node, nodemap):
"""
@ -590,8 +590,9 @@ class TreeBaseModel(gtk.GenericTreeModel):
Otherwise, a node should never be added twice!
"""
if not self.group_can_have_handle:
raise ValueError, 'Attempt to add node twice to the model (%s:%s)' \
% (str(parent), str(child))
print ('WARINING: Attempt to add node twice to the model (%s: %s)'
% (str(parent), str(child)))
return
if handle:
node.set_handle(handle)
if not self._in_build: