mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-05 19:42:36 +02:00
Merge remote-tracking branch 'origin/GP-0-dragonmacher-test-fixes-3-21-23'
This commit is contained in:
commit
78171efe34
2 changed files with 11 additions and 7 deletions
|
@ -82,16 +82,16 @@ abstract public class CompositeEditorTableAction extends DockingAction implement
|
|||
}
|
||||
|
||||
JTable table = ((CompositeEditorPanel) provider.getComponent()).getTable();
|
||||
if (table instanceof GTable gTable) {
|
||||
gTable.requestTableFocus();
|
||||
if (!table.isEditing()) {
|
||||
table.requestFocus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (table.isEditing()) {
|
||||
table.getEditorComponent().requestFocus();
|
||||
if (table instanceof GTable gTable) {
|
||||
gTable.requestTableEditorFocus();
|
||||
}
|
||||
else {
|
||||
table.requestFocus();
|
||||
table.getEditorComponent().requestFocus();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -940,14 +940,18 @@ public class GTable extends JTable {
|
|||
public boolean editCellAt(int row, int column, EventObject e) {
|
||||
boolean editAtCell = super.editCellAt(row, column, e);
|
||||
if (editAtCell) {
|
||||
requestTableFocus();
|
||||
requestTableEditorFocus();
|
||||
}
|
||||
return editAtCell;
|
||||
}
|
||||
|
||||
public void requestTableFocus() {
|
||||
public void requestTableEditorFocus() {
|
||||
TableCellEditor currentEditor = getCellEditor();
|
||||
Component editorComponent = getEditorComponent();
|
||||
if (editorComponent == null) {
|
||||
return; // not editing
|
||||
}
|
||||
|
||||
if (currentEditor instanceof FocusableEditor focusable) {
|
||||
focusable.focusEditor();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue