Core: locked property added in transaction cannot be undone
Author: Roy-043Created Aug 30, 2026Updated Sep 17, 2026
LabelsMod: CoreTopic: Undo/RedoStatus: ConfirmedPriority: High
Problem description
If a locked property is added to an existing object in a transaction, that step cannot be undone.
Workbench affected?
Core (App, Gui,...)
Steps to reproduce
- Open a new document.
- Paste the code below in the Python Console.
- Undo 1 step.
- Result: The Length of the box has changed back to 10, but the object still has the DummyLength property.
- Undo another step.
- Result: the creation step has been undone.
import FreeCAD as App
doc = App.activeDocument()
doc.openTransaction("Create Box")
box = doc.addObject("Part::Box", "TestBox")
doc.commitTransaction()
doc.openTransaction("Add and Change Property")
box.addProperty("App::PropertyLength", "DummyLength", "DummyProperties", locked=True)
box.DummyLength = 123
box.Length = 15
doc.commitTransaction()
doc.recompute()
Expected behavior
All actions in a transaction should be undoable.
Actual behavior
n/a
Development version About Info (in Safe Mode)
OS: Ubuntu 22.04.5 LTS (ubuntu:GNOME/ubuntu/wayland)
Architecture: x86_64
Version: 26.3.0dev.20260819 (Git shallow)
Build date: 2026/08/19 23:20:55
Build type: Release
Branch: (HEAD detached at 2bb00c918)
Hash: 2bb00c91865d376c4ab0441a3a887b4f2d0a3090
Python 3.11.14, Qt 6.8.3, Coin 4.0.10 (bundled), Pivy 0.6.11 (bundled), Vtk 9.3.1, boost 1_86, Eigen3 3.4.0, PySide 6.8.3
shiboken 6.8.3, xerces-c 3.3.0, Clipper2 , IfcOpenShell 0.8.0, OCC 7.8.1
Locale: Dutch/Netherlands (nl_NL)
Stylesheet/Theme/QtStyle: unset/FreeCAD Classic/
QPA/File dialog/Color dialog: xcb/via Qt/via Qt
Navigation Style/Orbit Style/Rotation Mode: TinkerCAD/Trackball/Drag at cursor
Logical DPI/Physical DPI/Pixel Ratio: 96/91.7275/1
OpenGL version/vendor/renderer: 4.5 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.4/AMD/KABINI (, LLVM 15.0.7, DRM 2.50, 6.8.0-138-generic)
Installed mods:
Last known good version (optional)
Source: FreeCAD/FreeCAD