Disabled-arrow pick-class hint + undo/redo ordering fixes + JHU blue accents - #159
Merged
Merged
Conversation
undoMaskEdit/redoMaskEdit always preferred the smart-fill stack regardless of order, so an older fill-type undo could jump ahead of a newer brush stroke. Track _lastFillEditTime/_lastBrushEditTime and pick whichever stack was touched most recently. Also gives point/box segment its own sparse before/after undo entry on the same fill-history stack (touching only voxels that actually changed), and swaps the post-submit full representation rebuild for the same lightweight _notifySegmentationChanged() refresh brush/ smart-fill already use, avoiding an every-class-mask flash on every click/box prompt. Adds LIVEWIRE_OUTWARD_BIAS_VOXELS to nudge the live-wire/magnet snap point past the raw gradient-magnitude peak, correcting an inward boundary bias relative to the visually-perceived edge.
usePolygonDraw's own Ctrl+Z listener (pop last placed point) and the global mask-edit undo listener are both on window, so stopPropagation alone didn't stop the sibling listener — one press was undoing a pending point AND a previous brush stroke. Use stopImmediatePropagation() instead. useKeyboardShortcuts now takes an onUndo callback (owned by VisualizationPage) instead of calling undoMaskEdit() directly, so a pending polygon point can be peeled off first before falling through to the committed-edit undo stack.
…use handling - Introduces handleUndo() as the single entry point for both the Undo button and Ctrl+Z: peels off a pending scissors/lasso point before falling through to undoMaskEdit(). - useInteractivePromptTool now tracks status (idle/applying/success/ error) and calls onComplete() only on a successful, voxel-changing submit, so point/box segment (single-shot, unlike paint/erase) deselects itself after one use instead of staying armed. - Point/box segment now calls releasePrimaryMouseTools() (not just toggling the crosshair off), since box-segment's mousedown->drag-> mouseup was still bound to Cornerstone's default primary-drag tool (pan/window-level), so dragging a box also panned/adjusted the CT view underneath it. - 3D pane defaults to mesh mode for non-local (dataset) cases instead of always volume. - Removes the enhance.state === 'streaming' gate blocking 3D volume viewport setup, and drops the unused sessionDisplayLabel/ loadRecentUploads lookup in favor of showing the raw caseId. - Smart-fill preview point color updated from orange to JHU blue to match the accent color change.
The FlyoutArrow next to equip-and-use tools called openToolSettings unconditionally, bypassing the enabled check the main icon button already had — clicking it with no class selected silently opened an empty settings flyout. Routes it through the same pickClassHintOpen walkthrough popout instead. Also: - Adds onGuidedPickingChange prop so VisualizationPage can suppress Crosshairs for a guided slice-anchor pick's entire lifecycle, not just the picking sub-phase. - pointSegment/boxSegment no longer get a settings arrow (equip-and- use with no configurable settings). - Tightens several tool description strings and the sliceOps guided- hint copy.
vp-topbar had a bubbling onClick that closed showAnnotationToolbar on any click inside the topbar (blank space, dividers, every button) except two explicitly excluded refs. This silently overrode all per-button close logic and also fired on clicks in dead space between button groups, not just the intended 'other tool' clicks. Removed the handler. Closing the annotation toolbar/SegmentsPopup now only happens via the explicit closeAnnotationToolbarIfOpen() calls on Download and HD, plus the Annotate button's own toggle — Crosshair, Measure, View, Cine/Play, Undo, Redo, Layout (MPR), Window (soft tissue), and Adjust are left untouched.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits for details.