'Finish the interaction. Restore any leftover state in this method.
.. note:: This gets called from the default :func:`cancel`
implementation.'

def end(self):

    self.__finished = True
    if (self.scene.user_interaction_handler is self):
        self.scene.set_user_interaction_handler(None)
    if self.__canceled:
        self.canceled.emit()
        self.canceled[int].emit(self.__cancelReason)
    else:
        self.finished.emit()
    self.ended.emit()
    if self.deleteOnEnd:
        self.deleteLater()
