mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 12:00:04 +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
|
@Override
|
||||||
public void closeComponent() {
|
public void closeComponent() {
|
||||||
|
|
||||||
|
// end any table editing; this prevents exceptions on focus changes when closing this editor
|
||||||
|
refsTable.editingStopped(new ChangeEvent(refsTable));
|
||||||
super.closeComponent();
|
super.closeComponent();
|
||||||
plugin.providerClosed(this);
|
plugin.providerClosed(this);
|
||||||
}
|
}
|
||||||
|
@ -895,7 +898,7 @@ public class EditReferencesProvider extends ComponentProviderAdapter
|
||||||
comboBox.addItem(rt);
|
comboBox.addItem(rt);
|
||||||
}
|
}
|
||||||
if (selectedIndex < 0) {
|
if (selectedIndex < 0) {
|
||||||
comboBox.insertItemAt(value, 0);
|
comboBox.insertItemAt((RefType) value, 0);
|
||||||
selectedIndex = 0;
|
selectedIndex = 0;
|
||||||
}
|
}
|
||||||
comboBox.setSelectedIndex(selectedIndex);
|
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() {
|
public CellEditComboBox() {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see javax.swing.JComboBox#setSelectedIndex(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setSelectedIndex(int anIndex) {
|
public void setSelectedIndex(int anIndex) {
|
||||||
if (refsTable.getRowCount() == 0) {
|
if (refsTable.getRowCount() == 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue