def itemChange(self, change, value): if change == QGraphicsItem.ItemPositionChange and self.scene(): command = CommandMoveItem(self, value) self.scene().undoStack.push(command) return QGraphicsLineItem.itemChange(self, change, value)
def itemChange(self, change, variant): if change != QGraphicsItem.ItemSelectedChange: global Dirty Dirty = True return QGraphicsLineItem.itemChange(self, change, variant)