fix: use Gui.Document.Modified instead of App.Document.Modified #14

Merged
forbes merged 2 commits from fix/save-modified-attribute into main 2026-02-10 12:57:30 +00:00
Owner

Problem

Every Silo save fails with:

Silo save failed: 'App.Document' object has no attribute 'Modified'

silo_origin.py:396 does doc.Modified = False where doc is an App.Document. The Modified property only exists on Gui.Document (FreeCADGui.getDocument()). The save itself succeeds but the modified flag is never cleared, so the document always appears unsaved.

Fix

Replace doc.Modified = False with:

gui_doc = FreeCADGui.getDocument(doc.Name)
if gui_doc:
    gui_doc.Modified = False

This matches the pattern already used correctly in silo_commands.py:910-912.

Closes #13 (Bug 1)

## Problem Every Silo save fails with: ``` Silo save failed: 'App.Document' object has no attribute 'Modified' ``` `silo_origin.py:396` does `doc.Modified = False` where `doc` is an `App.Document`. The `Modified` property only exists on `Gui.Document` (`FreeCADGui.getDocument()`). The save itself succeeds but the modified flag is never cleared, so the document always appears unsaved. ## Fix Replace `doc.Modified = False` with: ```python gui_doc = FreeCADGui.getDocument(doc.Name) if gui_doc: gui_doc.Modified = False ``` This matches the pattern already used correctly in `silo_commands.py:910-912`. Closes #13 (Bug 1)
forbes added 1 commit 2026-02-10 00:40:33 +00:00
App.Document has no 'Modified' attribute — it only exists on
Gui.Document. This caused every Silo save to fail with:
  Silo save failed: 'App.Document' object has no attribute 'Modified'

The save itself succeeded but the modified flag was never cleared,
so the document always appeared unsaved.
forbes added 1 commit 2026-02-10 12:57:20 +00:00
forbes merged commit 6d231e80dd into main 2026-02-10 12:57:30 +00:00
forbes deleted branch fix/save-modified-attribute 2026-02-10 12:57:30 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/silo-mod#14