feat(gui): Add link deletion and DAG cycle validation to Visual DAG

This commit is contained in:
2026-03-06 17:38:08 -05:00
parent f1605682fc
commit 78e47a13f9
3 changed files with 95 additions and 0 deletions

20
temp_edit4.py Normal file
View File

@@ -0,0 +1,20 @@
with open('src/gui_2.py', 'r', encoding='utf-8', newline='') as f:
content = f.read()
old = ''' imgui.end_popup()
if self.show_script_output:'''
new = ''' imgui.end_popup()
# Cycle Detected Popup
if imgui.begin_popup_modal("Cycle Detected!", None, imgui.WindowFlags_.always_auto_resize)[0]:
imgui.text_colored(imgui.ImVec4(1, 0.3, 0.3, 1), "The dependency graph contains a cycle!")
imgui.text("Please remove the circular dependency.")
if imgui.button("OK"):
imgui.close_current_popup()
imgui.end_popup()
if self.show_script_output:'''
content = content.replace(old, new)
with open('src/gui_2.py', 'w', encoding='utf-8', newline='') as f:
f.write(content)
print('Done')