eric6/QScintilla/EditorOutline.py

changeset 7696
f7e2cb3fc9d4
parent 7692
94f0017f9372
child 7749
285855999b4e
--- 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