Skip to content

Commit

Permalink
Remove the @slot decorator of plugins.editor.Editor.new(). Fix spyder…
Browse files Browse the repository at this point in the history
…-ide#3186

The original `@Slot()` decorator of `Editor.new(self, fname, ...)` ignores the
`fname` argument which is passed in when creating a new module with a given
name (e.g., through context menu "New -> Module..." in Project explorer).
The correct decorator should be `@Slot(str)`, which can also be ignored
completely since a Qt Signal can connect to a plain Python callable.
  • Loading branch information
ShenggaoZhu committed May 26, 2016
1 parent fe2d9f1 commit 6847aa7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spyderlib/plugins/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ def _clone_file_everywhere(self, finfo):
editor = editorstack.clone_editor_from(finfo, set_current=False)
self.register_widget_shortcuts("Editor", editor)

@Slot()
# @Slot(str)
def new(self, fname=None, editorstack=None, text=None):
"""
Create a new file - Untitled
Expand Down

0 comments on commit 6847aa7

Please sign in to comment.