Skip to content

[Subtask] Visibility mode: hide non-selected nodes and incident edges #212

@oxy86

Description

@oxy86

Overview

Add a persistent visibility mode that hides all non-selected nodes and their incident edges, so users can keep working on a reduced on-screen graph without modifying the underlying network.

This differs from a one-shot “focus on selection” action: it behaves as a toggleable view mode that can stay active while the user continues exploring, repositioning nodes, or running layouts on the visible subset.


Behavior

When enabled:

  • Selected nodes remain visible
  • All non-selected nodes are hidden
  • All edges incident to hidden nodes are hidden

When disabled:

  • Full graph visibility is restored

If the selection changes while the mode is active, the visible set should be recomputed.


UI Suggestions

  • Menu / context menu entry:
    • "Hide non-selected nodes"
  • Optional checkbox / toggle button in toolbar or side panel

Implementation Notes

  • Must be non-destructive
  • Should operate through existing visibility controls rather than deleting data
  • Can reuse the same visibility plumbing as:
    • setNodeVisibility(...)
    • setEdgeVisibility(...)
  • Works naturally with GraphicsWidget::selectedNodes() and current scene selection APIs :contentReference[oaicite:0]{index=0}

Edge Cases

  • No selection:
    • either do nothing, or
    • show a short user-facing message
  • Multi-selection:
    • keep all selected nodes visible
    • keep only edges between visible nodes visible

Relation to Feature

Part of:
#209 Graph decluttering & focus visualization

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions