EditorOutline: added actions to collapse/expand all entries.

Sun, 06 Sep 2020 12:19:56 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 06 Sep 2020 12:19:56 +0200
changeset 7692
94f0017f9372
parent 7690
a59680062837
child 7693
a51f82458a1b

EditorOutline: added actions to collapse/expand all entries.

docs/changelog file | annotate | diff | comparison | revisions
eric6/QScintilla/EditorOutline.py file | annotate | diff | comparison | revisions
--- a/docs/changelog	Fri Sep 04 18:50:43 2020 +0200
+++ b/docs/changelog	Sun Sep 06 12:19:56 2020 +0200
@@ -4,6 +4,7 @@
 - bug fixes
 - Editor
   -- added an outline widget showing the structure of the editor source code
+     and allowing to navigate in the code
 
 Version 20.9:
 - bug fixes
--- a/eric6/QScintilla/EditorOutline.py	Fri Sep 04 18:50:43 2020 +0200
+++ b/eric6/QScintilla/EditorOutline.py	Sun Sep 06 12:19:56 2020 +0200
@@ -239,6 +239,15 @@
         self.__menu.addSeparator()
         self.__menu.addAction(
             QCoreApplication.translate(
+                'EditorOutlineView', 'Expand All'),
+            lambda: self.expandToDepth(-1))
+        self.__menu.addAction(
+            QCoreApplication.translate(
+                'EditorOutlineView', 'Collapse All'),
+            self.collapseAll)
+        self.__menu.addSeparator()
+        self.__menu.addAction(
+            QCoreApplication.translate(
                 'EditorOutlineView', 'Increment Width'),
             self.__incWidth)
         self.__menu.addAction(
@@ -267,6 +276,15 @@
         self.__attributeMenu.addSeparator()
         self.__attributeMenu.addAction(
             QCoreApplication.translate(
+                'EditorOutlineView', 'Expand All'),
+            lambda: self.expandToDepth(-1))
+        self.__attributeMenu.addAction(
+            QCoreApplication.translate(
+                'EditorOutlineView', 'Collapse All'),
+            self.collapseAll)
+        self.__attributeMenu.addSeparator()
+        self.__attributeMenu.addAction(
+            QCoreApplication.translate(
                 'EditorOutlineView', 'Increment Width'),
             self.__incWidth)
         self.__attributeMenu.addAction(
@@ -287,6 +305,15 @@
         self.__backMenu.addSeparator()
         self.__backMenu.addAction(
             QCoreApplication.translate(
+                'EditorOutlineView', 'Expand All'),
+            lambda: self.expandToDepth(-1))
+        self.__backMenu.addAction(
+            QCoreApplication.translate(
+                'EditorOutlineView', 'Collapse All'),
+            self.collapseAll)
+        self.__backMenu.addSeparator()
+        self.__backMenu.addAction(
+            QCoreApplication.translate(
                 'EditorOutlineView', 'Increment Width'),
             self.__incWidth)
         self.__backMenu.addAction(

eric ide

mercurial