From cab35e45a3a17dec50d6b24857f29693b152a477 Mon Sep 17 00:00:00 2001 From: Dominik Demuth Date: Sat, 4 Feb 2023 16:42:12 +0100 Subject: [PATCH] add objects to graph --- src/gui_qt/graphs/graphwindow.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui_qt/graphs/graphwindow.py b/src/gui_qt/graphs/graphwindow.py index 029d9ff..e0a63f0 100644 --- a/src/gui_qt/graphs/graphwindow.py +++ b/src/gui_qt/graphs/graphwindow.py @@ -48,6 +48,7 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): self.real_plots = {} self.imag_plots = {} self.error_plots = {} + self.drawings = {} self._special_needs = [] self._external_items = [] @@ -343,6 +344,10 @@ class QGraphWindow(QtWidgets.QGraphicsView, Ui_GraphWindow): return True + def addDrawing(self, obj): + self.drawings[obj.id] = obj + self.graphic.addItem(obj.drawing) + def closeEvent(self, evt: QtGui.QCloseEvent): if not self.closable: evt.ignore()