Merge remote-tracking branch 'origin/Ghidra_10.4'

This commit is contained in:
Ryan Kurtz 2023-09-20 11:52:50 -04:00
commit 8cb9abcec9
2 changed files with 10 additions and 2 deletions

View file

@ -229,6 +229,10 @@ public class VTMatchTableProvider extends ComponentProviderAdapter
private VTMatchTableModel createTableModel() { private VTMatchTableModel createTableModel() {
matchesTableModel = new VTMatchTableModel(controller); matchesTableModel = new VTMatchTableModel(controller);
matchesTableModel.addTableModelListener(e -> { matchesTableModel.addTableModelListener(e -> {
if (matchesTable == null) {
return; // we've been disposed
}
int filteredCount = matchesTableModel.getRowCount(); int filteredCount = matchesTableModel.getRowCount();
int unfilteredCount = matchesTableModel.getUnfilteredRowCount(); int unfilteredCount = matchesTableModel.getUnfilteredRowCount();

View file

@ -168,6 +168,10 @@ public abstract class VTMatchOneToManyTableProvider extends ComponentProviderAda
protected GhidraTable initializeMatchesTable() { protected GhidraTable initializeMatchesTable() {
oneToManyTableModel = getMatchesTableModel(); oneToManyTableModel = getMatchesTableModel();
oneToManyTableModel.addTableModelListener(e -> { oneToManyTableModel.addTableModelListener(e -> {
if (matchesTable == null) {
return; // we've been disposed
}
if (pendingMatchSelection != null) { if (pendingMatchSelection != null) {
setSelectedMatch(pendingMatchSelection); setSelectedMatch(pendingMatchSelection);
} }
@ -235,7 +239,7 @@ public abstract class VTMatchOneToManyTableProvider extends ComponentProviderAda
int row = oneToManyTableModel.getRowIndex(match); int row = oneToManyTableModel.getRowIndex(match);
if (row < 0) { if (row < 0) {
pendingMatchSelection = match; pendingMatchSelection = match;
// this happen while reloading. If so, save the match and listen for // this happen while reloading. If so, save the match and listen for
// the table data changed and restore the selection at that point // the table data changed and restore the selection at that point
return; return;
} }
@ -469,7 +473,7 @@ public abstract class VTMatchOneToManyTableProvider extends ComponentProviderAda
//================================================================================================== //==================================================================================================
// FilterDialogModel Methods // FilterDialogModel Methods
//================================================================================================== //==================================================================================================
@Override @Override
public void addFilter(Filter<VTMatch> filter) { public void addFilter(Filter<VTMatch> filter) {