+ fix global logging
This commit is contained in:
@@ -125,7 +125,7 @@ class gui:
|
|||||||
values["-JAVA FOLDER-"],
|
values["-JAVA FOLDER-"],
|
||||||
)
|
)
|
||||||
output_path = values['-OUTPUT FOLDER-']
|
output_path = values['-OUTPUT FOLDER-']
|
||||||
nassi(file_path, output_path)
|
nassi(file_path, output_path, gui=self)
|
||||||
|
|
||||||
fnames = output(values)
|
fnames = output(values)
|
||||||
window['-OUTPUT FILE LIST-'].update(fnames)
|
window['-OUTPUT FILE LIST-'].update(fnames)
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ from interpreter.NassiShneidermann import NassiShneidermanDiagram
|
|||||||
from draw.Iinstruction import *
|
from draw.Iinstruction import *
|
||||||
|
|
||||||
|
|
||||||
def nassi(filepath:str, output_path: str):
|
def nassi(filepath:str, output_path: str, gui):
|
||||||
NSD = NassiShneidermanDiagram(False)
|
NSD = NassiShneidermanDiagram(gui=gui)
|
||||||
NSD.load_from_file(filepath)
|
NSD.load_from_file(filepath)
|
||||||
NSD.convert_to_image(output_path + "/Nassi-Shneider-Diagramm", 500)
|
NSD.convert_to_image(output_path + "/Nassi-Shneider-Diagramm", 500)
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ import logging
|
|||||||
from draw.Iinstruction import Iinstruction
|
from draw.Iinstruction import Iinstruction
|
||||||
from interpreter import interpret_source as itp
|
from interpreter import interpret_source as itp
|
||||||
from draw import code_to_image as cti
|
from draw import code_to_image as cti
|
||||||
from gui.gui import gui
|
|
||||||
|
|
||||||
|
|
||||||
class NassiShneidermanDiagram:
|
class NassiShneidermanDiagram:
|
||||||
|
|
||||||
def __init__(self, debug: bool=False) -> None:
|
def __init__(self, gui):
|
||||||
self.instructions: dict[str, Iinstruction] = {}
|
self.instructions: dict[str, Iinstruction] = {}
|
||||||
self.init_logging(gui.debug_mode)
|
self.init_logging(gui.debug_mode)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user