We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 868d50c commit 1bf4106Copy full SHA for 1bf4106
python/console/console.py
@@ -645,14 +645,11 @@ def saveScriptFile(self):
645
error.strerror)
646
self.callWidgetMessageBarEditor(msgText, 2, False)
647
648
- def saveAsScriptFile(self, index=-1):
+ def saveAsScriptFile(self, index=None):
649
tabWidget = self.tabEditorWidget.currentWidget()
650
- if index != -1:
651
- tabWidget = self.tabEditorWidget.widget(index)
652
- index = self.tabEditorWidget.currentIndex()
653
- if tabWidget is None:
654
- return
655
- if tabWidget.path is None:
+ if not index:
+ index = self.tabEditorWidget.currentIndex()
+ if not tabWidget.path:
656
pathFileName = self.tabEditorWidget.tabText(index) + '.py'
657
fileNone = True
658
else:
0 commit comments