EditorOutline: reset the current item marker when no item could be found matching the cursor position.

Wed, 09 Sep 2020 18:04:21 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 09 Sep 2020 18:04:21 +0200
changeset 7696
f7e2cb3fc9d4
parent 7695
032a0586a349
child 7697
c981a807aab1

EditorOutline: reset the current item marker when no item could be found matching the cursor position.

eric6/QScintilla/EditorOutline.py file | annotate | diff | comparison | revisions
--- a/eric6/QScintilla/EditorOutline.py	Wed Sep 09 18:02:39 2020 +0200
+++ b/eric6/QScintilla/EditorOutline.py	Wed Sep 09 18:04:21 2020 +0200
@@ -7,7 +7,7 @@
 Module implementing an outline widget for source code navigation of the editor.
 """
 
-from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication
+from PyQt5.QtCore import pyqtSlot, Qt, QCoreApplication, QModelIndex
 from PyQt5.QtWidgets import QTreeView, QAbstractItemView, QMenu, QApplication
 
 from UI.BrowserSortFilterProxyModel import BrowserSortFilterProxyModel
@@ -445,3 +445,5 @@
             if index.isValid():
                 self.setCurrentIndex(index)
                 self.scrollTo(index)
+        else:
+            self.setCurrentIndex(QModelIndex())

eric ide

mercurial