Skip to content

Commit

Permalink
Merge from 5.x: PR #15172
Browse files Browse the repository at this point in the history
Fixes #15164
  • Loading branch information
ccordoba12 committed Apr 7, 2021
2 parents 96a044e + ed3d6de commit ef2dc9b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ if [ "$USE_CONDA" = "true" ]; then
# Remove packages we have subrepos for
conda remove spyder-kernels --force -q -y
conda remove python-language-server --force -q -y

# Provisional change to prevent error from jupyter_client 6.1.13
conda install jupyter_client=6.1.12
else
# Update pip and setuptools
pip install -U pip setuptools
Expand All @@ -52,6 +55,9 @@ else
# Remove packages we have subrepos for
pip uninstall spyder-kernels -q -y
pip uninstall python-language-server -q -y

# Provisional change to prevent error from jupyter_client 6.1.13
pip install jupyter_client==6.1.12
fi

# This is necessary only for Windows (don't know why).
Expand Down
15 changes: 15 additions & 0 deletions spyder/app/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,21 @@ def last_plugin(self):
# spyder/plugins/base::_switch_to_plugin
return self.layouts.get_last_plugin()

def maximize_dockwidget(self, restore=False):
"""
This is needed to prevent errors with the old API at
spyder/plugins/base::_switch_to_plugin.
See spyder-ide/spyder#15164
Parameters
----------
restore : bool, optional
If the current dockwidget needs to be restored to its unmaximized
state. The default is False.
"""
self.layouts.maximize_dockwidget(restore=restore)

def switch_to_plugin(self, plugin, force_focus=None):
"""
Switch to this plugin.
Expand Down

0 comments on commit ef2dc9b

Please sign in to comment.