'DockWidget visibility has changed'

def visibility_changed(self, enable):

    SpyderPluginWidget.visibility_changed(self, enable)
    if self.dockwidget.isWindow():
        self.dock_toolbar.show()
    else:
        self.dock_toolbar.hide()
    if enable:
        self.refresh_plugin()
    self.sig_update_plugin_title.emit()
