Skip to content

Only offer DPD and DPT objects as device element children - #37

Open
sujandumaru wants to merge 1 commit into
mainfrom
fix-add-child-default
Open

sujandumaru wants to merge 1 commit into
mainfrom
fix-add-child-default

Conversation

@sujandumaru

Copy link
Copy Markdown
Member

A device element can only have device process data and device property objects as its children. AgIsoStack enforces this when it loads a pool, but the editor was not enforcing it when you build one.

Before. The "Add Child Object Reference" list showed almost every object in the pool. Open EXAMPLE.ddop and click the "Sprayer" element: the box already says "AgIsoStack++ UnitTest", which is the device itself, and pressing "Add Object" makes the
device a child of the element. Value presentation objects were in the list too. The editorsaves such a file without complaining, and then fails to load it back with [DDOP]: A DET object may only have DPD and DPT children.

After. The list has process data and property objects only, so you can not pick anything else. The same element now opens on "Actual Work State" instead of the device. And if the pool has no process data or property object yet, the panel tells you to add one first, instead of showing an empty picker.

I tested this on EXAMPLE.ddop and EXAMPLE_V4.ddop. Adding a child still works and the pools still save and load. The round trip tests do not link the GUI, so there is no new test here.

@sujandumaru sujandumaru added the bug Something isn't working label Sep 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant