Skip to content

Preserve node option locks and saved locked connections - #43

Open
dajiaohuang wants to merge 1 commit into
DebugST:mainfrom
dajiaohuang:repostew/preserve-node-locks-20261016
Open

dajiaohuang wants to merge 1 commit into
DebugST:mainfrom
dajiaohuang:repostew/preserve-node-locks-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown

Problem

WinForms saves LockOption from _LockLocation. Saving/loading a node with different option/location locks changes its behavior. After correcting that field alone, restoring an existing edge between option-locked nodes is rejected by the normal edit-lock check. Related: #28.

Change

Serialize the independent option-lock flag. While restoring each saved edge, temporarily lift the two edit locks and restore them in finally; normal interactive connection checks are unchanged. Update the matching CN/EN tutorial source snippets.

Validation

dotnet run --project tests/Locks/Locks.csproj passes on Windows/.NET Framework 4.8. It checks all four option/location-lock combinations, positions, and existing connections after a real canvas save/load. It paints offscreen before saving to isolate this repair from the separate drawing-cache persistence issue. The one-field-only repair failed the connection assertion.

No interactive UI or full demo acceptance is claimed.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant