Mercurial > hg > graal-jvmci-8
changeset 3104:c8bfc73cb21c
IdealGraphVisualizer: Fix selection of node for gotoFigure()
author | Peter Hofer <peter.hofer@jku.at> |
---|---|
date | Thu, 30 Jun 2011 17:02:04 +0200 |
parents | 6484bdc9b508 |
children | 3664989976e2 |
files | src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramScene.java |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramScene.java Thu Jun 30 16:50:53 2011 +0200 +++ b/src/share/tools/IdealGraphVisualizer/View/src/com/sun/hotspot/igv/view/DiagramScene.java Thu Jun 30 17:02:04 2011 +0200 @@ -60,6 +60,7 @@ import java.awt.event.MouseWheelEvent; import java.awt.event.MouseWheelListener; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.HashMap; @@ -1141,11 +1142,9 @@ Rectangle r = w.getBounds(); Point p = w.getLocation(); centerRectangle(new Rectangle(p.x, p.y, r.width, r.height)); - } public void gotoFigure(final Figure f) { - if (!isVisible(f)) { showFigure(f); } @@ -1153,7 +1152,7 @@ FigureWidget fw = getWidget(f); if (fw != null) { centerWidget(fw); - getModel().setSelectedNodes(f.getSource().getSourceNodesAsSet()); + setSelection(Arrays.asList(f)); } }