Skip to content
Permalink
Browse files

[pyqgis-console] a simple syntax checker for the editor

- some fixes and code cleanup
  • Loading branch information
slarosa committed May 11, 2013
1 parent adb2653 commit a60e74a01ed0e2e9b3c67f2729ffec7ff3dfcb01
@@ -102,6 +102,7 @@
<file>themes/default/console/iconSearchEditorConsole.png</file>
<file>themes/default/console/iconSearchNextEditorConsole.png</file>
<file>themes/default/console/iconSearchPrevEditorConsole.png</file>
<file>themes/default/console/iconSyntaxErrorConsole.png</file>
<file>themes/default/extents.png</file>
<file>themes/default/favourites.png</file>
<file>themes/default/geographic.png</file>
Binary file not shown.
@@ -160,7 +160,7 @@ def __init__(self, parent=None):
saveFileBt = QCoreApplication.translate("PythonConsole", "Save")
self.saveFileButton = QAction(self)
self.saveFileButton.setCheckable(False)
self.saveFileButton.setEnabled(True)
self.saveFileButton.setEnabled(False)
self.saveFileButton.setIcon(QgsApplication.getThemeIcon("console/iconSaveConsole.png"))
self.saveFileButton.setMenuRole(QAction.PreferencesRole)
self.saveFileButton.setIconVisibleInMenu(True)
@@ -537,6 +537,11 @@ def _textFindChanged(self):
self.findPrevButton.setEnabled(False)

def onClickGoToLine(self, item, column):
if item.text(1) == 'syntaxError':
check = self.tabEditorWidget.currentWidget().newEditor.syntaxCheck()
if check:
self.tabEditorWidget.currentWidget().save()
return
linenr = int(item.text(1))
itemName = str(item.text(0))
charPos = itemName.find(' ')

0 comments on commit a60e74a

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