Skip to content
Permalink
Browse files

[pyqgis-console] minor fixes: followup a60e74a

  • Loading branch information
slarosa committed May 12, 2013
1 parent a60e74a commit 0a5e09a69c4568ef86b9bd4d66e83b6660404c3b
Showing with 8 additions and 6 deletions.
  1. +4 −3 python/console/console.py
  2. +4 −3 python/console/console_editor.py
@@ -537,9 +537,10 @@ def _textFindChanged(self):
self.findPrevButton.setEnabled(False)

def onClickGoToLine(self, item, column):
tabEditor = self.tabEditorWidget.currentWidget().newEditor
if item.text(1) == 'syntaxError':
check = self.tabEditorWidget.currentWidget().newEditor.syntaxCheck()
if check:
check = self.tabEditorWidget.currentWidget().newEditor.syntaxCheck(fromContextMenu=False)
if check and not tabEditor.isReadOnly():
self.tabEditorWidget.currentWidget().save()
return
linenr = int(item.text(1))
@@ -549,7 +550,7 @@ def onClickGoToLine(self, item, column):
objName = itemName[0:charPos]
else:
objName = itemName
self.tabEditorWidget.currentWidget().newEditor.goToLine(objName, linenr)
tabEditor.goToLine(objName, linenr)

def sextante(self):
self.shell.commandConsole('sextante')
@@ -733,7 +733,8 @@ def save(self):
if overwrite:
os.remove(temp_path)
fN = path.split('/')[-1]
self.tw.setTabTitle(self, fN)
if not self.newEditor.isReadOnly():
self.tw.setTabTitle(self, fN)
self.tw.setTabToolTip(self.tw.currentIndex(), path)
self.newEditor.setModified(False)
self.pc.saveFileButton.setEnabled(False)
@@ -979,8 +980,8 @@ def _removeTab(self, tab, tab2index=False):
return
else:
self.parent.updateTabListScript(self.widget(tab).path)
if self.count() <= 1:
self.removeTab(tab)
self.removeTab(tab)
if self.count() <= 1:
self.newTabEditor()
else:
if self.widget(tab).path is not None or \

0 comments on commit 0a5e09a

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