Skip to content

Fix double and boolean array property roundtrips - #44

Open
dajiaohuang wants to merge 1 commit into
DebugST:mainfrom
dajiaohuang:repostew/property-array-roundtrip-20261016
Open

dajiaohuang wants to merge 1 commit into
DebugST:mainfrom
dajiaohuang:repostew/property-array-roundtrip-20261016

Conversation

@dajiaohuang

Copy link
Copy Markdown

Problem

A node with a supported [STNodeProperty] double[] or bool[] property saves successfully but cannot load its own canvas: the existing matching parsers are guarded by repeated int type checks, so they are unreachable and loading throws InvalidCastException.

Change

Use the matching double/bool element-type checks in both the WinForms and native WPF property descriptors. No format, fallback, or API change.

Validation

On Windows, both executable regressions pass through actual GetCanvasData() / LoadCanvas() calls, checking every element of nonempty double and boolean arrays:

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

The same double-array invocation failed on the base with InvalidCastException. Native WPF net8 builds; unchanged main's net10 target separately fails with CS0012 for System.Private.Windows.GdiPlus. No interactive property-editor/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