mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 10:49:34 +02:00
Tests - fixed tests failing to bad test mouse clicking and focus
This commit is contained in:
parent
26cab55a64
commit
881dca75bf
5 changed files with 36 additions and 9 deletions
|
@ -1193,7 +1193,18 @@ public class FieldPanel extends JPanel
|
|||
cursorHandler.doCursorEnd(trigger);
|
||||
}
|
||||
|
||||
private FieldLocation getLocationForPoint(int x, int y) {
|
||||
public Point getPointForLocation(FieldLocation location) {
|
||||
|
||||
AnchoredLayout layout = findLayoutOnScreen(location.getIndex());
|
||||
if (layout == null) {
|
||||
return null;
|
||||
}
|
||||
Rectangle r =
|
||||
layout.getCursorRect(location.fieldNum, location.row, location.col);
|
||||
return r.getLocation();
|
||||
}
|
||||
|
||||
public FieldLocation getLocationForPoint(int x, int y) {
|
||||
FieldLocation location = new FieldLocation();
|
||||
// delegate to the appropriate layout to do the work
|
||||
Layout layout = findLayoutAt(y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue