def METHOD_NAME(self, widget):
    previous = self.getPlot3DWidget()
    if isinstance(previous, SceneWidget):
        previous.selection().sigCurrentChanged.disconnect(
            self._selectionChanged)
        self._selectionChanged(
            None, previous.selection().getCurrentItem())
    super(_PanPlaneAction, self).METHOD_NAME(widget)
    if isinstance(widget, SceneWidget):
        self._selectionChanged(widget.selection().getCurrentItem(), None)
        widget.selection().sigCurrentChanged.connect(
            self._selectionChanged)