Skip to content

Fix connection queries and persistence without repainting - #42

Open
dajiaohuang wants to merge 1 commit into
DebugST:mainfrom
dajiaohuang:repostew/connections-before-paint-20261016
Open

dajiaohuang wants to merge 1 commit into
DebugST:mainfrom
dajiaohuang:repostew/connections-before-paint-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown

Problem

On an unpainted WinForms canvas, ConnectOption succeeds and data transfers, but GetConnectionInfo() is empty and GetCanvasData() loses the connections because both read the drawing cache. Input GetConnectedOption() also compares against the output endpoint, so it returns no upstream peers in both implementations. Related: #21 and #33.

Change

Read WinForms connection information from the actual option graph and use that snapshot for saving; correct the input-to-output lookup in both implementations. Skip the supported STNodeOption.Empty output spacer during path traversal (otherwise connecting a node containing a spacer throws).

Validation

On Windows, both commands pass:

  • dotnet run --project tests/Connections/Connections.csproj -f net48
  • dotnet run --project tests/Connections/Connections.csproj -f net8.0-windows

The regression creates tiny nodes, transfers data, queries both endpoints, saves/loads before painting, and checks multiple peers/disconnection and a spacer. No plugins or external graph files are needed.

Native WPF net8 builds; the existing net10 target separately fails with CS0012 for System.Private.Windows.GdiPlus (also reproduced on unchanged main). No interactive UI acceptance or full demo suite 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