Skip to content

Remove duplicate windowing useEffect left by merge conflict#36

Merged
aperson30 merged 1 commit into
mainfrom
aditya/fix-windowing-merge-dup
Jun 28, 2026
Merged

Remove duplicate windowing useEffect left by merge conflict#36
aperson30 merged 1 commit into
mainfrom
aditya/fix-windowing-merge-dup

Conversation

@aperson30

Copy link
Copy Markdown
Collaborator

What

Follow-up to #35. The merge that brought #35 into main (alongside the online-3D branch) left a duplicate, conflicting useEffect in WindowingSlider.tsx:

useEffect(() => {
  setWidthInput(windowWidth);
  setCenterInput(windowCenter);   // ← un-negated
}, [windowWidth, windowCenter]);

It ran after the two scoped effects on every window change and overwrote centerInput with the un-negated center, reintroducing the Brightness textbox/slider mismatch that #35 fixed.

Fix

Removed the stray effect. The two existing scoped effects already keep widthInput and centerInput (negated, matching the slider) in sync when the parent changes the CT window.

A bad merge-conflict resolution left a third useEffect that set
centerInput to the un-negated window center, overwriting the scoped
effect above it and reintroducing the Brightness textbox/slider
mismatch. The two scoped effects already keep both inputs in sync.
@aperson30 aperson30 merged commit 00b0271 into main Jun 28, 2026
6 checks passed
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