This commit is contained in:
weckyy702
2021-01-24 22:03:32 +01:00
parent a41cc0369d
commit 4a4646bdbc

View File

@@ -55,15 +55,11 @@ class NassiShneidermanDiagram:
return filepath
def convert_to_image(self, output_path: str, on_conflict: Overwrite_behaviour=OB.SKIP) -> bool:
number_of_item = 1
i = 0
for scope in self.function_scopes:
#this shizz is not my fault. Ole was the stupid one
number_of_item += 1
try:
cancel = one_line_progress_meter('Progress', number_of_item, len(self.function_scopes), '-PROGRESSBAR-')
if not cancel:
return False
#I am the one responsible from here on
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 = self.check_conflicts(filepath, on_conflict)
@@ -78,6 +74,7 @@ class NassiShneidermanDiagram:
except:
logging.error(f"Failed to save image {filepath}. Unknown error")
raise
i+=1
return True
def load_from_file(self, filepath:str, itp_custom_tags: Optional[Dict[str, List[str]]]):