From 3a2baebcdecec2575db44e21a96204bbf942611b Mon Sep 17 00:00:00 2001
From: Pierre-Antoine Rouby <pierre-antoine.rouby@inrae.fr>
Date: Wed, 7 Jun 2023 14:53:25 +0200
Subject: [PATCH] Sections: Add stricklers edit shortcut.

---
 src/View/Sections/Window.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/View/Sections/Window.py b/src/View/Sections/Window.py
index 4176b8c3..514cfe27 100644
--- a/src/View/Sections/Window.py
+++ b/src/View/Sections/Window.py
@@ -35,6 +35,8 @@ from View.Geometry.PlotKPC import PlotKPC
 from View.Sections.PlotStricklers import PlotStricklers
 from View.Sections.translate import *
 
+from View.Stricklers.Window import StricklersWindow
+
 _translate = QCoreApplication.translate
 
 class SectionsWindow(ASubMainWindow, ListedSubWindow):
@@ -129,6 +131,7 @@ class SectionsWindow(ASubMainWindow, ListedSubWindow):
         self.find(QAction, "action_add").triggered.connect(self.add)
         self.find(QAction, "action_del").triggered.connect(self.delete)
         self.find(QAction, "action_sort").triggered.connect(self.sort)
+        self.find(QAction, "action_edit_stricklers").triggered.connect(self.edit_stricklers)
 
         self.undo_sc.activated.connect(self.undo)
         self.redo_sc.activated.connect(self.redo)
@@ -219,3 +222,11 @@ class SectionsWindow(ASubMainWindow, ListedSubWindow):
 
     def redo(self):
         self._table.redo()
+
+    def edit_stricklers(self):
+        self.strick = StricklersWindow(
+            study = self._study,
+            config = self.parent.conf,
+            parent = self
+        )
+        self.strick.show()
-- 
GitLab