diff --git a/src/View/Configure/Window.py b/src/View/Configure/Window.py
index 3e51f5c1..8d941180 100644
--- a/src/View/Configure/Window.py
+++ b/src/View/Configure/Window.py
@@ -140,6 +140,7 @@ class ConfigureWindow(ASubWindow, ListedSubWindow):
def setup_sc(self):
self._undo_stack = QUndoStack()
+ self.debug_sc = QShortcut(QKeySequence("Ctrl+G"), self)
self.undo_sc = QShortcut(QKeySequence.Undo, self)
self.redo_sc = QShortcut(QKeySequence.Redo, self)
self.copy_sc = QShortcut(QKeySequence.Copy, self)
@@ -173,6 +174,8 @@ class ConfigureWindow(ASubWindow, ListedSubWindow):
for button in buttons:
self.find(QPushButton, button).clicked.connect(buttons[button])
+ self.debug_sc.activated.connect(self.set_debug)
+
def accept(self):
# Solvers
self.conf.solvers = self.solver_table_model.rows.copy()
@@ -209,6 +212,11 @@ class ConfigureWindow(ASubWindow, ListedSubWindow):
self.conf.save()
self.close()
+ # Debug
+ def set_debug(self):
+ self.conf.debug = not self.conf.debug
+ print(f"[DEBUG] Debug mode set : {self.conf.debug}")
+
# Solvers
def edit_solver(self):
diff --git a/src/View/MainWindow.py b/src/View/MainWindow.py
index a907426d..5150409c 100644
--- a/src/View/MainWindow.py
+++ b/src/View/MainWindow.py
@@ -114,7 +114,8 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
self.findChild(QAction, action).setEnabled(enable)
def setup_sc(self):
- self._run_sc = QShortcut(QKeySequence("F5"), self)
+ # self._run_sc = QShortcut(QKeySequence("F5"), self)
+ return
def setup_connection(self):
"""Connect action to callback function
@@ -165,7 +166,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
.triggered.connect(actions[action])
# action.triggered.connect(actions[action])
- self._run_sc.activated.connect(self.run_solver)
+ # self._run_sc.activated.connect(self.run_solver)
def changeEvent(self, event):
if event.type() == QEvent.LanguageChange:
diff --git a/src/View/ui/ConfigureDialog.ui b/src/View/ui/ConfigureDialog.ui
index 8f9a5603..bbde334e 100644
--- a/src/View/ui/ConfigureDialog.ui
+++ b/src/View/ui/ConfigureDialog.ui
@@ -21,6 +21,9 @@
-
+
+ true
+
0
@@ -37,6 +40,9 @@
false
+
+ true
+
Solvers
@@ -224,6 +230,9 @@
+
+ false
+
Backup
@@ -414,6 +423,19 @@
Editor
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
-
@@ -422,11 +444,11 @@
- This value must be used for reading or editing files in speficic case
+ This value must be used for reading or editing files in speficic case.
- -
+
-
-
@@ -444,18 +466,12 @@
- -
-
-
- Qt::Vertical
+
-
+
+
+ - The "@file" keyworkd is replace by the path of file to open.
-
-
- 20
- 40
-
-
-
+
diff --git a/src/View/ui/MainWindow.ui b/src/View/ui/MainWindow.ui
index 619b87e6..eb64701c 100644
--- a/src/View/ui/MainWindow.ui
+++ b/src/View/ui/MainWindow.ui
@@ -597,6 +597,9 @@
Run solver
+
+ F5
+
@@ -746,9 +749,6 @@
Run solver on current study
-
- Ctrl+X
-
diff --git a/src/config.py b/src/config.py
index b58325be..66d91396 100644
--- a/src/config.py
+++ b/src/config.py
@@ -19,8 +19,6 @@ class Config(SQL):
self.filename = Config.filename()
self.set_default_value()
- print(self.filename)
-
super(Config, self).__init__(filename = self.filename)
def _create(self):
@@ -135,6 +133,10 @@ class Config(SQL):
v = self.execute("SELECT value FROM data WHERE key='lang'")
self.lang = v[0]
+ # Debug
+ v = self.execute("SELECT value FROM data WHERE key='debug'")
+ self.debug = v[0] == "True"
+
self._load_solver()
self._load_stricklers()
@@ -183,6 +185,7 @@ class Config(SQL):
"backup_max": self.backup_max,
"editor": self.editor,
"lang": self.lang,
+ "debug": self.debug,
}
for key in data:
@@ -226,6 +229,9 @@ class Config(SQL):
# Stricklers
self.stricklers = StricklersList()
+ # Debug
+ self.debug = False
+
@classmethod
def filename(cls):
file = ""