def on_load_json(self, *args):
"""Triggered when load-button is clicked.
Displays a load dialog, clears the GUI, populates the merge and uppdates the GUI"""
_setup_filename = filedialog.askopenfilename(defaultextension=".json",
filetypes=[('JSON files', '.json'), ('all files', '.*')],
title="Choose file")
if _setup_filename is not None:
self.notify_task('Loading setup..', 0)
try:
self.setup.load_from_file(_setup_filename=_setup_filename)
self.setup_filename.set(_setup_filename)
except Exception as e:
self.notify_messagebox("Error loading data", str(e))
self.setup_to_gui()
self.notify_task('Loading setup..done', 100)
self.resize()
评论列表
文章目录