Skip to content

Commit

Permalink
graphics: small fixes for interaction marker
Browse files Browse the repository at this point in the history
  • Loading branch information
looooo committed Jul 15, 2020
1 parent 0caac77 commit 638b07e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pivy/graphics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ def drag_start(self):
def drag_objects(self):
if self.enabled:
return [self]
return []

def delete(self):
if self.enabled and not self._delete:
Expand Down Expand Up @@ -423,14 +424,18 @@ def remove_selected(self):
self.selection_changed()

# needs upper case as this must overwrite the addChild from coin.SoSeparator
def removeAllChildren(self):
def removeAllChildren(self, clear_all=False):
for i in self.dynamic_objects:
i.delete()
self.dynamic_objects = []
self.static_objects = []
self.selected_objects = []
self.over_object = None
super(InteractionSeparator, self).removeAllChildren()
if clear_all:
super(InteractionSeparator, self).removeAllChildren()
else:
# only delets graphics objects
self.objects.removeAllChildren()

# needs upper case as this must overwrite the addChild from coin.SoSeparator
def addChild(self, child):
Expand Down

0 comments on commit 638b07e

Please sign in to comment.