'Commit the current item geometry state to the document.'

def commit(self):

    rect = self.item.geometry()
    if (self.savedRect != rect):
        command = commands.SetAttrCommand(self.annotation, 'rect', (rect.x(), rect.y(), rect.width(), rect.height()), name='Edit    text    geometry')
        self.document.undoStack().push(command)
        self.savedRect = rect
