forked from IPKM/nmreval
add objects to graph
This commit is contained in:
parent
793786fda8
commit
cab35e45a3
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user