add objects to graph

This commit is contained in:
Dominik Demuth 2023-02-04 16:42:12 +01:00
parent 793786fda8
commit cab35e45a3

View File

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