src/eric7/QScintilla/SearchReplaceWidget.py

branch
eric7
changeset 9943
02a40e8bd135
parent 9938
b8005dd4fc9b
child 9972
68ac01294544
--- a/src/eric7/QScintilla/SearchReplaceWidget.py	Wed Mar 29 10:45:00 2023 +0200
+++ b/src/eric7/QScintilla/SearchReplaceWidget.py	Wed Mar 29 11:32:06 2023 +0200
@@ -964,6 +964,17 @@
             self.selectionCheckBox.setChecked(False)
             self.__selections = []
 
+    @pyqtSlot(Editor)
+    def editorClosed(self, editor):
+        """
+        Public slot to handle the closing of an editor.
+
+        @param editor reference to the closed editor
+        @type Editor
+        """
+        if self.__currentEditor is not None and self.__currentEditor is editor:
+            self.__currentEditor = None
+
     def replace(self):
         """
         Public method to replace the current selection.
@@ -1430,6 +1441,16 @@
         """
         self.__searchReplaceWidget.updateSelectionCheckBox(editor)
 
+    @pyqtSlot(Editor)
+    def editorClosed(self, editor):
+        """
+        Public slot to handle the closing of an editor.
+
+        @param editor reference to the closed editor
+        @type Editor
+        """
+        self.__searchReplaceWidget.editorClosed(editor)
+
     def show(self, text="", replaceMode=False):
         """
         Public slot to show the widget.

eric ide

mercurial