Skip to content

Commit

Permalink
Preserve dynamic layout flag after changing viewer input
Browse files Browse the repository at this point in the history
The state of the "dynamic layout" flag should be restored after the
viewer input has changed, rather than always be set again. This flag can
only be "false" if explicitly unset by the user. It should therefore
remain disabled until explicitly enabled again.
  • Loading branch information
ptziegler committed Sep 19, 2024
1 parent 7102481 commit a24485d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ public void mouseDoubleClick(MouseEvent e) {

@Override
protected void inputChanged(Object input, Object oldInput) {
boolean dynamicLayoutEnabled = graph.isDynamicLayoutEnabled();
graph.setDynamicLayout(false);
super.inputChanged(input, oldInput);
graph.setDynamicLayout(true);
graph.setDynamicLayout(dynamicLayoutEnabled);
graph.applyLayout();
}

Expand Down

0 comments on commit a24485d

Please sign in to comment.