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()