fix: use FreeCADGui.Document.Modified instead of App.Document.IsModified() #16

Merged
forbes merged 2 commits from fix/pull-is-modified-bug into main 2026-02-10 16:41:24 +00:00

View File

@@ -990,8 +990,10 @@ def _check_pull_conflicts(part_number, local_path, doc=None):
conflicts = []
# Check for unsaved changes in an open document
if doc is not None and doc.IsModified():
conflicts.append("Document has unsaved local changes.")
if doc is not None:
gui_doc = FreeCADGui.getDocument(doc.Name) if doc.Name else None
if gui_doc and gui_doc.Modified:
conflicts.append("Document has unsaved local changes.")
# Check local revision vs server latest
if doc is not None: