Editor: fixed an issue handling breakpoints (and other stuff) in a cloned editor.

Mon, 15 Feb 2021 19:56:28 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 15 Feb 2021 19:56:28 +0100
changeset 8106
81bf8fe10735
parent 8105
eb3c1170c135
child 8107
7d3932bde11b

Editor: fixed an issue handling breakpoints (and other stuff) in a cloned editor.

eric6/QScintilla/Editor.py file | annotate | diff | comparison | revisions
--- a/eric6/QScintilla/Editor.py	Mon Feb 15 19:55:50 2021 +0100
+++ b/eric6/QScintilla/Editor.py	Mon Feb 15 19:56:28 2021 +0100
@@ -508,6 +508,8 @@
             self.__encodingChanged(editor.encoding, propagate=False)
             self.__spellLanguageChanged(editor.getSpellingLanguage(),
                                         propagate=False)
+            # link the warnings to the original editor
+            self.warnings = editor.warnings
         
         self.setAcceptDrops(True)
         
@@ -2667,7 +2669,7 @@
         """
         for handle in self.bookmarks:
             self.markerDeleteHandle(handle)
-        self.bookmarks = []
+        self.bookmarks.clear()
         self.bookmarkToggled.emit(self)
         self.__markerMap.update()
     
@@ -6084,7 +6086,7 @@
         """
         for handle in self.notcoveredMarkers:
             self.markerDeleteHandle(handle)
-        self.notcoveredMarkers = []
+        self.notcoveredMarkers.clear()
         self.coverageMarkersShown.emit(False)
         self.showingNotcoveredMarkers = False
         self.__markerMap.update()
@@ -6329,7 +6331,7 @@
             line = self.markerLine(handle) + 1
             self.toggleSyntaxError(line, 0, False)
         
-        self.syntaxerrors = {}
+        self.syntaxerrors.clear()
         self.syntaxerrorToggled.emit(self)
     
     def __showSyntaxError(self, line=-1):
@@ -6542,7 +6544,7 @@
             self.warnings[handle] = []
             self.__setAnnotation(self.markerLine(handle))
             self.markerDeleteHandle(handle)
-        self.warnings = {}
+        self.warnings.clear()
         self.syntaxerrorToggled.emit(self)
         self.__markerMap.update()
     
@@ -7267,7 +7269,7 @@
         # clear breakpoint markers
         for handle in list(self.breaks.keys()):
             self.markerDeleteHandle(handle)
-        self.breaks = {}
+        self.breaks.clear()
         
         if not os.path.exists(self.fileName):
             # close the file, if it was deleted in the background

eric ide

mercurial