diff -r f6be97f4d96a -r 479cf39ac9cb src/eric7/QScintilla/EditorAssembly.py --- a/src/eric7/QScintilla/EditorAssembly.py Sat Jul 06 19:48:50 2024 +0200 +++ b/src/eric7/QScintilla/EditorAssembly.py Sun Jul 07 12:57:21 2024 +0200 @@ -55,6 +55,9 @@ self.__showNavigator = Preferences.getEditor("ShowSourceNavigator") self.__showOutline = Preferences.getEditor("ShowSourceOutline") + self.__outlineSortByOccurrence = Preferences.getEditor( + "SourceOutlineListContentsByOccurrence" + ) self.__editor = Editor(dbs, fn, vm, filetype, editor, tv) self.__buttonsWidget = EditorButtonsWidget(self.__editor, self) @@ -127,6 +130,15 @@ """ showNavigator = Preferences.getEditor("ShowSourceNavigator") showOutline = Preferences.getEditor("ShowSourceOutline") + outlineSortByOccurrence = Preferences.getEditor( + "SourceOutlineListContentsByOccurrence" + ) + + if self.__outlineSortByOccurrence != outlineSortByOccurrence: + self.__outlineSortByOccurrence = outlineSortByOccurrence + if self.__showOutline: + self.__sourceOutline.repopulate() + if showOutline != self.__showOutline or showNavigator != self.__showNavigator: self.__showOutline = showOutline self.__showNavigator = showNavigator