Skip to content

Stabilize node traffic role editing#5

Merged
wnj00524 merged 1 commit into
masterfrom
codex/wpf-network-simulator
Apr 7, 2026
Merged

Stabilize node traffic role editing#5
wnj00524 merged 1 commit into
masterfrom
codex/wpf-network-simulator

Conversation

@wnj00524
Copy link
Copy Markdown
Owner

@wnj00524 wnj00524 commented Apr 7, 2026

Keep auto-arrange from resetting in-memory node edits, normalize duplicate node traffic profiles by traffic type, and route the node editor through explicit top-level view-model bindings so traffic type and role changes remain stable across additional consumer nodes.

Keep auto-arrange from resetting in-memory node edits, normalize duplicate node traffic profiles by traffic type, and route the node editor through explicit top-level view-model bindings so traffic type and role changes remain stable across additional consumer nodes.
@wnj00524 wnj00524 merged commit f6646d0 into master Apr 7, 2026
0 of 2 checks passed
@wnj00524 wnj00524 deleted the codex/wpf-network-simulator branch April 7, 2026 16:29
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors node traffic profile management by introducing proxy properties in MainWindowViewModel for XAML bindings and implementing a normalization process to merge duplicate traffic profiles. Additionally, the AutoArrangeNodes method was updated to modify existing node coordinates directly rather than reloading the entire network. Feedback was provided regarding a redundant conditional check in the node definition change handler.

return;
}

if (!isNormalizingNodeTrafficProfiles && sender is NodeViewModel node)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The check !isNormalizingNodeTrafficProfiles is redundant here because the method already returns early on line 767 if this condition is true.

        if (sender is NodeViewModel node)

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