+ fix fatal error by @weckyy
This commit is contained in:
@@ -145,7 +145,7 @@ class Gui:
|
|||||||
)
|
)
|
||||||
output_path = values['-OUTPUT FOLDER-']
|
output_path = values['-OUTPUT FOLDER-']
|
||||||
nassi(file_path, output_path, gui=self,
|
nassi(file_path, output_path, gui=self,
|
||||||
font_filepath=str(font_filepath))
|
font_filepath=font_filepath)
|
||||||
|
|
||||||
fnames = output(values)
|
fnames = output(values)
|
||||||
window['-OUTPUT FILE LIST-'].update(fnames)
|
window['-OUTPUT FILE LIST-'].update(fnames)
|
||||||
|
|||||||
@@ -4,9 +4,14 @@ import os
|
|||||||
from interpreter.NassiShneidermann import NassiShneidermanDiagram
|
from interpreter.NassiShneidermann import NassiShneidermanDiagram
|
||||||
from draw.Iinstruction import *
|
from draw.Iinstruction import *
|
||||||
|
|
||||||
def nassi(filepath:str, output_path: str, gui, font_filepath: str=None):
|
def nassi(filepath:str, output_path: str, gui, font_filepath=None):
|
||||||
NSD = NassiShneidermanDiagram(gui.debug_mode)
|
NSD = NassiShneidermanDiagram(gui.debug_mode)
|
||||||
if font_filepath is not None and font_filepath != "":
|
#if font_filepath is None:
|
||||||
|
# pass
|
||||||
|
#else:
|
||||||
|
#if font_filepath is not None or font_filepath != "":
|
||||||
|
if font_filepath != None:
|
||||||
|
print(font_filepath)
|
||||||
NSD.set_font(font_filepath)
|
NSD.set_font(font_filepath)
|
||||||
NSD.load_from_file(filepath)
|
NSD.load_from_file(filepath)
|
||||||
NSD.convert_to_image(output_path, 500)
|
NSD.convert_to_image(output_path, 500)
|
||||||
|
|||||||
Reference in New Issue
Block a user