Change interactor style for a little time


I’m trying to allow rubber band 2D to change field of view of a slice node.
Thus I change interactor style for vtkInteractorStyleRubberBand2D for a while and then I need to restore the default vtkMRMLSliceViewInteractorStyle.

The problem is that vtkMRMLSliceViewInteractorStyle is initialized in qMRMLSliceViewPrivate as vtkNew<> pointer so the interactor is the owner and gets some displayable managers.
Thus it seems I cannot simply create new instance of that style and pass it to the interactor.

Can’t understand how to restore the default vtkMRMLSliceViewInteractorStyle. Or maybe there are other ways to implement that.

Oh completely forgot about vtkWeakPointer<>.
It seems I’m able to store previous interactor style in weak pointer in member variable within diplayable manager.
After changing FOV I can restore it back to the interactor.