- each CNCJob object has now it's own text_collection for the annotations which allow the individual enabling and disabling of the annotations

This commit is contained in:
Marius Stanciu
2019-08-16 17:21:31 +03:00
parent eb385c1b28
commit e061c4364a
3 changed files with 14 additions and 8 deletions

View File

@@ -183,8 +183,11 @@ class PlotCanvas(QtCore.QObject):
c.antialias = 0
return c
def new_text_group(self):
return TextGroup(self.text_collection)
def new_text_group(self, collection=None):
if collection:
return TextGroup(collection)
else:
return TextGroup(self.text_collection)
def new_text_collection(self, **kwargs):
return TextCollection(parent=self.vispy_canvas.view.scene, **kwargs)