Don't reset markers on files which should not be checked. BgService

Sat, 04 Jan 2014 22:14:38 +0100

author
T.Rzepka <Tobias.Rzepka@gmail.com>
date
Sat, 04 Jan 2014 22:14:38 +0100
branch
BgService
changeset 3174
86047f5f4155
parent 3173
1fb284abe46e
child 3177
5af61402d74d

Don't reset markers on files which should not be checked.

Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Sat Jan 04 22:12:42 2014 +0100
+++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py	Sat Jan 04 22:14:38 2014 +0100
@@ -150,8 +150,6 @@
         self.checkProgress.setVisible(True)
         QApplication.processEvents()
         
-        self.__clearErrors()
-        
         if isinstance(fn, list):
             self.files = fn
         elif os.path.isdir(fn):
@@ -164,6 +162,15 @@
         else:
             self.files = [fn]
         
+        # Reset marker for every file which is open and getting checked
+        vm = e5App().getObject("ViewManager")
+        openFiles = vm.getOpenFilenames()
+        for openFile in openFiles:
+            if openFile in self.files:
+                editor = vm.getOpenEditor(openFile)
+                editor.clearSyntaxError()
+                editor.clearFlakesWarnings()
+        
         if codestring or len(self.files) > 0:
             self.checkProgress.setMaximum(max(1, len(self.files)))
             self.checkProgress.setVisible(len(self.files) > 1)
@@ -279,7 +286,6 @@
             QTreeWidgetItem(self.resultList, [self.trUtf8('No issues found.')])
             QApplication.processEvents()
             self.showButton.setEnabled(False)
-            self.__clearErrors()
         else:
             self.showButton.setEnabled(True)
         self.resultList.header().resizeSections(QHeaderView.ResizeToContents)

eric ide

mercurial