code: def dockVisibilityChanged(self, visible):
          
          logger.debug("dockVisibilityChanged of {!r}: visible={}".format(self, visible))
  
          if visible:
              self._repoTreeView.sigRepoItemChanged.connect(self.repoItemChanged)
              self._isConnected = True
  
              currentRepoItem, _currentIndex = self._repoTreeView.getCurrentItem()
              self.repoItemChanged(currentRepoItem)
          else:
              # At start-up the pane be be hidden but the signals are not connected.
              # A disconnect would fail in that case so we test for isConnected == True.
              if self.isConnected:
                  self._repoTreeView.sigRepoItemChanged.disconnect(self.repoItemChanged)
  
              self._isConnected = False
              self.errorWidget.setError(msg="Contents disabled", title="Error")
              self.setCurrentIndex(self.ERROR_PAGE_IDX)
docs: Slot to be called when the dock widget that this pane contains become (in)visible.
              Is used to (dis)connect the pane from its repo tree view and so prevent unnecessary
              and potentially costly updates when the pane is hidden.