Recorrection GUI step ; LaTeX issues debugging
This commit is contained in:
1 parent
2d0f7a219f
commit
48602c24f1
12 files changed
+306
-8
No files matched your search
@@ -30,6 +30,7 @@ from .scores import ScoreEditorPanel
|
||||
from .notifications import notify_desktop
|
||||
from .syncthing import SyncthingPanel
|
||||
from .manual_resolution import ManualResolutionPanel
|
||||
from .recorrection import prepare_selection_file
|
||||
from .refaire import SECTION as REFAIRE_SECTION
|
||||
from .refaire import (
|
||||
RefaireSelection,
|
||||
@@ -930,6 +931,14 @@ class CopienatorApp(tk.Tk):
|
||||
self.arg_vars['target'].trace_add('write', lambda *_args: self._refresh_persp_inventory())
|
||||
self._refresh_persp_inventory()
|
||||
|
||||
if step.id == "prepare_recorrection":
|
||||
self.edit_recorrection_button = ttk.Button(
|
||||
self.form, text="Ouvrir refaire.json (avec exemples)",
|
||||
command=self._edit_recorrection,
|
||||
)
|
||||
self.edit_recorrection_button.grid(row=row, column=0, columnspan=2, sticky="w", pady=8)
|
||||
row += 1
|
||||
|
||||
if step.id == "manual_resolution":
|
||||
def manual_evaluation():
|
||||
target = self.arg_vars.get("target")
|
||||
@@ -1117,6 +1126,7 @@ class CopienatorApp(tk.Tk):
|
||||
"cutleft",
|
||||
"labels",
|
||||
"plotting",
|
||||
"splitting",
|
||||
}
|
||||
if step.id in copy_selection_steps:
|
||||
evaluation = self.evaluation
|
||||
@@ -1310,6 +1320,16 @@ class CopienatorApp(tk.Tk):
|
||||
except (OSError, RuntimeError) as exc:
|
||||
messagebox.showerror("Ouverture impossible", str(exc))
|
||||
|
||||
def _edit_recorrection(self) -> None:
|
||||
if self.evaluation is None:
|
||||
return
|
||||
try:
|
||||
path = prepare_selection_file(self.evaluation)
|
||||
except OSError as exc:
|
||||
messagebox.showerror("Préparation impossible", str(exc))
|
||||
return
|
||||
self._open_desktop_path(path, "fichier refaire.json")
|
||||
|
||||
def _select_variant(self, index: int) -> None:
|
||||
if not self.current_step or index < 0:
|
||||
return
|
||||
@@ -1546,6 +1566,15 @@ class CopienatorApp(tk.Tk):
|
||||
if step.id == "refaire_selection":
|
||||
self._save_refaire_selection()
|
||||
return
|
||||
if step.id == "prepare_recorrection":
|
||||
try:
|
||||
load_selection(evaluation)
|
||||
except (OSError, ValueError, TypeError) as exc:
|
||||
messagebox.showerror("Sélection à vérifier", str(exc))
|
||||
return
|
||||
self._mark_step("success")
|
||||
self._select_refaire_correction()
|
||||
return
|
||||
if step.section == REFAIRE_SECTION:
|
||||
try:
|
||||
self._refaire_selection()
|
||||
|
||||
Reference in new issue
Block a user