Skip to content

Commit

Permalink
Merge pull request #4097 from dalthviz/fixes_issue_4086
Browse files Browse the repository at this point in the history
PR: Add a validation for editorstack existence
  • Loading branch information
ccordoba12 authored Feb 4, 2017
2 parents 0e08506 + a501591 commit d4def8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion continuous_integration/travis/build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ cd $FULL_SPYDER_CLONE
if [ $TRAVIS_PULL_REQUEST != "false" ] ; then
git checkout travis_pr_$TRAVIS_PULL_REQUEST
else
git checkout master
git checkout $TRAVIS_BRANCH
fi

# -- Build package
Expand Down
2 changes: 1 addition & 1 deletion continuous_integration/travis/modules_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cd $FULL_SPYDER_CLONE
if [ $TRAVIS_PULL_REQUEST != "false" ] ; then
git checkout travis_pr_$TRAVIS_PULL_REQUEST
else
git checkout master
git checkout $TRAVIS_BRANCH
fi

# Depth 1
Expand Down
7 changes: 4 additions & 3 deletions spyder/plugins/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,9 +1475,10 @@ def refresh_file_dependent_actions(self):
def refresh_save_all_action(self):
"""Enable 'Save All' if there are files to be saved"""
editorstack = self.get_current_editorstack()
state = any(finfo.editor.document().isModified()
for finfo in editorstack.data)
self.save_all_action.setEnabled(state)
if editorstack:
state = any(finfo.editor.document().isModified()
for finfo in editorstack.data)
self.save_all_action.setEnabled(state)

def update_warning_menu(self):
"""Update warning list menu"""
Expand Down

0 comments on commit d4def8e

Please sign in to comment.