New file : config.py (for models)
This commit is contained in:
+8
-7
@@ -193,14 +193,15 @@ class ImageViewer:
|
||||
self.forward_stack = []
|
||||
self.current_pil_image = None
|
||||
|
||||
from config import PLOTTING_KB
|
||||
|
||||
# Bindings
|
||||
self.root.bind('<Return>', self.on_enter)
|
||||
self.root.bind('p', self.on_previous)
|
||||
self.root.bind('e', self.on_edit)
|
||||
self.root.bind('o', self.on_open_pdf)
|
||||
self.root.bind('i', self.on_open_interro)
|
||||
self.root.bind('O', self.on_open_ori_pdf)
|
||||
self.root.bind(PLOTTING_KB["OK"], self.on_enter)
|
||||
self.root.bind(PLOTTING_KB["previous"], self.on_previous)
|
||||
self.root.bind(PLOTTING_KB["edit"], self.on_edit)
|
||||
self.root.bind(PLOTTING_KB["open pdf"], self.on_open_pdf)
|
||||
self.root.bind(PLOTTING_KB["open originial pdf"], self.on_open_ori_pdf)
|
||||
self.root.bind(PLOTTING_KB["open eval"], self.on_open_interro)
|
||||
self.root.bind('<Escape>', lambda e: self.root.quit())
|
||||
self.label.bind('<Button-1>', self.on_click)
|
||||
|
||||
@@ -279,7 +280,7 @@ class ImageViewer:
|
||||
|
||||
if metadata.get("error"):
|
||||
msg = f"Error generating boxes for {json_path.name}:\n\n{metadata['error']}\n\nPlease press 'e' to fix the JSON file, then press Enter to retry."
|
||||
messagebox.showerror("Processing Error", msg)
|
||||
messagebox.showerror("Processing Error", msg)
|
||||
|
||||
def on_enter(self, event):
|
||||
if self.is_viewing:
|
||||
|
||||
Reference in New Issue
Block a user