mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GT-2951 - fixed exception when closing Reference Editor dialog with an
active edit in the table
This commit is contained in:
parent
27a19596c7
commit
46e270339b
1 changed files with 5 additions and 8 deletions
|
@ -561,6 +561,9 @@ public class EditReferencesProvider extends ComponentProviderAdapter
|
|||
|
||||
@Override
|
||||
public void closeComponent() {
|
||||
|
||||
// end any table editing; this prevents exceptions on focus changes when closing this editor
|
||||
refsTable.editingStopped(new ChangeEvent(refsTable));
|
||||
super.closeComponent();
|
||||
plugin.providerClosed(this);
|
||||
}
|
||||
|
@ -895,7 +898,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter
|
|||
comboBox.addItem(rt);
|
||||
}
|
||||
if (selectedIndex < 0) {
|
||||
comboBox.insertItemAt(value, 0);
|
||||
comboBox.insertItemAt((RefType) value, 0);
|
||||
selectedIndex = 0;
|
||||
}
|
||||
comboBox.setSelectedIndex(selectedIndex);
|
||||
|
@ -904,18 +907,12 @@ public class EditReferencesProvider extends ComponentProviderAdapter
|
|||
}
|
||||
}
|
||||
|
||||
private class CellEditComboBox extends JComboBox {
|
||||
private class CellEditComboBox extends JComboBox<RefType> {
|
||||
|
||||
/**
|
||||
* Constructor for MemRefComboBox.
|
||||
*/
|
||||
public CellEditComboBox() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.swing.JComboBox#setSelectedIndex(int)
|
||||
*/
|
||||
@Override
|
||||
public void setSelectedIndex(int anIndex) {
|
||||
if (refsTable.getRowCount() == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue