Merge remote-tracking branch 'origin/patch'

Conflicts:
	Ghidra/Features/GraphServices/src/main/java/ghidra/graph/visualization/DefaultGraphDisplay.java
This commit is contained in:
ghidra1
2020-12-11 19:13:08 -05:00
5 changed files with 48 additions and 14 deletions

View File

@@ -431,7 +431,7 @@ public class DefaultGraphDisplay implements GraphDisplay {
.popupMenuGroup("z", "5")
.keyBinding("escape")
.enabledWhen(c -> hasSelection())
.onAction(c -> clearSelection())
.onAction(c -> clearSelection(true))
.buildAndInstallLocal(componentProvider);
new ActionBuilder("Create Subgraph", ACTION_OWNER)
@@ -499,9 +499,9 @@ public class DefaultGraphDisplay implements GraphDisplay {
}
}
private void clearSelection() {
viewer.getSelectedVertexState().clear();
viewer.getSelectedEdgeState().clear();
private void clearSelection(boolean fireEvents) {
viewer.getSelectedVertexState().clear(fireEvents);
viewer.getSelectedEdgeState().clear(fireEvents);
}
private boolean hasSelection() {
@@ -816,6 +816,8 @@ public class DefaultGraphDisplay implements GraphDisplay {
* @param attributedGraph the {@link AttributedGraph} to visualize
*/
private void doSetGraphData(AttributedGraph attributedGraph) {
clearSelection(false);
focusedVertex = null;
graph = attributedGraph;
layoutTransitionManager.setEdgeComparator(new EdgeComparator(graph, "EdgeType",