Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py

changeset 3175
1a6638ccce9d
parent 3160
209a07d7e401
child 3178
f25fc1364c88
child 3186
a05eff845522
child 3817
0f58961a074f
diff -r 2c37b9a37b2d -r 1a6638ccce9d Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sat Jan 04 18:39:24 2014 +0100
+++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py	Sun Jan 05 15:20:02 2014 +0100
@@ -320,9 +320,6 @@
         self.checkProgress.setVisible(True)
         QApplication.processEvents()
         
-        self.__resetStatistics()
-        self.__clearErrors()
-        
         if save:
             self.__fileOrFileList = fn
         
@@ -349,6 +346,9 @@
                     [f for f in files
                      if not fnmatch.fnmatch(f, filter.strip())]
         
+        self.__resetStatistics()
+        self.__clearErrors(files)
+        
         py3files = [f for f in files
                     if f.endswith(
                         tuple(Preferences.getPython("Python3Extensions")))]
@@ -546,7 +546,6 @@
             QApplication.processEvents()
             self.statisticsButton.setEnabled(False)
             self.showButton.setEnabled(False)
-            self.__clearErrors()
         else:
             self.statisticsButton.setEnabled(True)
             self.showButton.setEnabled(True)
@@ -801,13 +800,16 @@
         elif button == self.statisticsButton:
             self.on_statisticsButton_clicked()
     
-    def __clearErrors(self):
+    def __clearErrors(self, files):
         """
-        Private method to clear all warning markers of open editors.
+        Private method to clear all warning markers of open editors to be
+        checked.
+        
+        @param files list of files to be checked (list of string)
         """
         vm = e5App().getObject("ViewManager")
         openFiles = vm.getOpenFilenames()
-        for file in openFiles:
+        for file in [f for f in openFiles if f in files]:
             editor = vm.getOpenEditor(file)
             editor.clearStyleWarnings()
     

eric ide

mercurial