mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-09 20:18:01 +08:00
Merge remote-tracking branch 'origin/GP-6674-dragonmacher-fg-cursor-update'
This commit is contained in:
+29
-4
@@ -83,13 +83,38 @@ public class VertexMouseInfo<V extends VisualVertex, E extends VisualEdge<V>> {
|
||||
return HAND_CURSOR;
|
||||
}
|
||||
|
||||
if (mousedDestinationComponent != null) {
|
||||
return mousedDestinationComponent.getCursor();
|
||||
Cursor c = getDestinationCursor();
|
||||
if (c != null) {
|
||||
return c;
|
||||
}
|
||||
|
||||
return DEFAULT_CURSOR;
|
||||
}
|
||||
|
||||
private Cursor getDestinationCursor() {
|
||||
|
||||
if (mousedDestinationComponent == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
Unusual Code
|
||||
|
||||
We'd like to let the component define the cursor to use. The component's default
|
||||
getCursor() methods will walk the hierarchy to find a cursor if one is not set. We only
|
||||
want the cursor if the component has one, not the parent's. If we use the graph
|
||||
viewer's' cursor, then the cursor doesn't change when hovering over a node. Thus, if
|
||||
the cursor is different than the viewer's, assume it is a valid cursor for that node.
|
||||
*/
|
||||
Cursor componentCursor = mousedDestinationComponent.getCursor();
|
||||
Cursor viewerCursor = viewer.getCursor();
|
||||
if (componentCursor != viewerCursor) {
|
||||
return componentCursor;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isGrabArea() {
|
||||
// subclasses can override to specify areas of the vertex that they can click in order
|
||||
// to edit and perform keyboard operations
|
||||
@@ -240,13 +265,13 @@ public class VertexMouseInfo<V extends VisualVertex, E extends VisualEdge<V>> {
|
||||
int scrollAmount = wheelEvent.getScrollAmount();
|
||||
int wheelRotation = wheelEvent.getWheelRotation();
|
||||
return new MouseWheelEvent(source, ev.getID(), ev.getWhen(),
|
||||
ev.getModifiers() | ev.getModifiersEx(), (int) clickPoint.getX(),
|
||||
ev.getModifiersEx(), (int) clickPoint.getX(),
|
||||
(int) clickPoint.getY(), ev.getClickCount(), ev.isPopupTrigger(),
|
||||
scrollType, scrollAmount, wheelRotation);
|
||||
}
|
||||
|
||||
return new MouseEvent(source, ev.getID(), ev.getWhen(),
|
||||
ev.getModifiers() | ev.getModifiersEx(), (int) clickPoint.getX(),
|
||||
ev.getModifiersEx(), (int) clickPoint.getX(),
|
||||
(int) clickPoint.getY(), ev.getClickCount(), ev.isPopupTrigger(),
|
||||
ev.getButton());
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ icon.logviewer.toolbar.file.open = icon.folder.open
|
||||
icon.projectdata.find.checkouts.search = icon.search {icon.check}
|
||||
icon.projectdata.copy = icon.copy
|
||||
icon.projectdata.cut = icon.cut
|
||||
icon.projectdata.delete = page_delete.png
|
||||
icon.projectdata.delete = icon.delete
|
||||
icon.projectdata.new.folder = icon.folder.new
|
||||
icon.projectdata.paste = icon.paste
|
||||
icon.projectdata.rename = page_edit.png
|
||||
|
||||
Reference in New Issue
Block a user