--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Wed Jan 01 14:39:32 2014 +0100 +++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Sun Jan 05 23:22:17 2014 +0100 @@ -147,8 +147,6 @@ self.checkProgress.setVisible(True) QApplication.processEvents() - self.__clearErrors() - if isinstance(fn, list): files = fn elif os.path.isdir(fn): @@ -161,6 +159,8 @@ else: files = [fn] + self.__clearErrors(files) + if codestring or len(files) > 0: self.checkProgress.setMaximum(max(1, len(files))) self.checkProgress.setVisible(len(files) > 1) @@ -247,7 +247,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) @@ -379,13 +378,16 @@ editor.clearSyntaxError() editor.clearFlakesWarnings() - def __clearErrors(self): + def __clearErrors(self, files): """ - Private method to clear all error markers of open editors. + Private method to clear all error and 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.clearSyntaxError() editor.clearFlakesWarnings()