Skip to content
Permalink
Browse files

[pyqgis-console] fixes save as action in editor

  • Loading branch information
slarosa committed Jan 8, 2014
1 parent 868d50c commit 1bf41063ca264a91e5740489a47b1ef2dab1d23e
Showing with 4 additions and 7 deletions.
  1. +4 −7 python/console/console.py
@@ -645,14 +645,11 @@ def saveScriptFile(self):
error.strerror)
self.callWidgetMessageBarEditor(msgText, 2, False)

def saveAsScriptFile(self, index=-1):
def saveAsScriptFile(self, index=None):
tabWidget = self.tabEditorWidget.currentWidget()
if index != -1:
tabWidget = self.tabEditorWidget.widget(index)
index = self.tabEditorWidget.currentIndex()
if tabWidget is None:
return
if tabWidget.path is None:
if not index:
index = self.tabEditorWidget.currentIndex()
if not tabWidget.path:
pathFileName = self.tabEditorWidget.tabText(index) + '.py'
fileNone = True
else:

0 comments on commit 1bf4106

Please sign in to comment.
You can’t perform that action at this time.