fix
This commit is contained in:
@@ -52,7 +52,7 @@ class Gui:
|
|||||||
font_filepath = None
|
font_filepath = None
|
||||||
output_name = None
|
output_name = None
|
||||||
output_path = None
|
output_path = None
|
||||||
exists_choice = OB.OVERWRITE
|
exists_choice = OB.SKIP
|
||||||
types = None
|
types = None
|
||||||
comments = None
|
comments = None
|
||||||
modifier = None
|
modifier = None
|
||||||
@@ -75,8 +75,8 @@ class Gui:
|
|||||||
window_settings = sg.Window(title='Settings', layout=layout_settings.layout, resizable=False)
|
window_settings = sg.Window(title='Settings', layout=layout_settings.layout, resizable=False)
|
||||||
event_settings, values_settings = window_settings.read()
|
event_settings, values_settings = window_settings.read()
|
||||||
while event_settings != '-EXIT-':
|
while event_settings != '-EXIT-':
|
||||||
if event_settings == '-OVERWRITE-' and exists_choice != OB.OVERWWRITE:
|
if event_settings == '-OVERWRITE-' and exists_choice != OB.OVERWRITE:
|
||||||
exists_choice = OB.OVERWWRITE
|
exists_choice = OB.OVERWRITE
|
||||||
break
|
break
|
||||||
elif event_settings == '-EXPICIT-' and exists_choice != OB.RANDOM_NAME:
|
elif event_settings == '-EXPICIT-' and exists_choice != OB.RANDOM_NAME:
|
||||||
exists_choice = OB.RANDOM_NAME
|
exists_choice = OB.RANDOM_NAME
|
||||||
|
|||||||
@@ -62,9 +62,8 @@ class NassiShneidermanDiagram:
|
|||||||
def convert_to_image(self, output_path: str, on_conflict: Overwrite_behaviour=OB.SKIP) -> bool:
|
def convert_to_image(self, output_path: str, on_conflict: Overwrite_behaviour=OB.SKIP) -> bool:
|
||||||
i = 0
|
i = 0
|
||||||
for scope in self.function_scopes:
|
for scope in self.function_scopes:
|
||||||
cancel = one_line_progress_meter('Progress', i, len(self.function_scopes), '-PROGRESSBAR-')
|
cancel = one_line_progress_meter('Progress', i+1, len(self.function_scopes), '-PROGRESSBAR-')
|
||||||
if not cancel:
|
|
||||||
return False
|
|
||||||
|
|
||||||
filepath = f"{output_path}/{scope.name}"
|
filepath = f"{output_path}/{scope.name}"
|
||||||
filepath = self.check_conflicts(filepath, on_conflict)
|
filepath = self.check_conflicts(filepath, on_conflict)
|
||||||
@@ -79,6 +78,9 @@ class NassiShneidermanDiagram:
|
|||||||
except:
|
except:
|
||||||
logging.error(f"Failed to save image {filepath}. Unknown error")
|
logging.error(f"Failed to save image {filepath}. Unknown error")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
if not cancel:
|
||||||
|
return False
|
||||||
i+=1
|
i+=1
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user