From f31b832f7807f1568e128d826ea45712714d125a Mon Sep 17 00:00:00 2001 From: Blaine Date: Mon, 15 Jun 2020 16:02:41 +0530 Subject: add dynamic stream table list --- src/main/python/shapes/line.py | 5 ++++- src/main/python/shapes/shapes.py | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main/python/shapes') diff --git a/src/main/python/shapes/line.py b/src/main/python/shapes/line.py index 516f34d..bbeab30 100644 --- a/src/main/python/shapes/line.py +++ b/src/main/python/shapes/line.py @@ -964,7 +964,10 @@ class Line(QGraphicsPathItem): changeArrowFlag = contextMenu.addAction(str) action = contextMenu.exec_(event.screenPos()) if action == addLableAction: - self.label.append(LineLabel(event.scenePos(), self)) + newLabel = LineLabel(event.scenePos(), self) + self.label.append(newLabel) + self.scene().labelAdded.emit(newLabel) + if action == changeArrowFlag: if str == "Hide Arrow": self.arrowFlag =False diff --git a/src/main/python/shapes/shapes.py b/src/main/python/shapes/shapes.py index 6d06cba..b4c53c5 100644 --- a/src/main/python/shapes/shapes.py +++ b/src/main/python/shapes/shapes.py @@ -530,6 +530,7 @@ class NodeItem(QGraphicsSvgItem): action = contextMenu.exec_(event.screenPos()) if action == addLabelAction: self.label = ItemLabel(event.scenePos(), self) + self.scene().labelAdded.emit(self.label) def __getstate__(self): return { -- cgit