mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 09:49:23 +02:00
Fixed table row resize issue when adding more than one data row per
table row
This commit is contained in:
parent
e4e2e4369e
commit
1b28cfaf86
1 changed files with 15 additions and 6 deletions
|
@ -126,7 +126,7 @@ public class GTable extends JTable {
|
|||
private Integer visibleRowCount;
|
||||
|
||||
private int userDefinedRowHeight;
|
||||
private TableModelListener rowHeightListener = e -> adjustRowHeight();
|
||||
private TableModelListener rowHeightListener;
|
||||
|
||||
private TableColumnModelListener tableColumnModelListener = null;
|
||||
private final Map<Integer, GTableCellRenderingData> columnRenderingDataMap = new HashMap<>();
|
||||
|
@ -521,6 +521,14 @@ public class GTable extends JTable {
|
|||
}
|
||||
|
||||
private void initializeRowHeight() {
|
||||
|
||||
// Note: this method gets called indirectly from the parent constructor, so we cannot
|
||||
// initialize this field at declaration time or in our constructor, as this call will have
|
||||
// happened at that point.
|
||||
if (rowHeightListener == null) {
|
||||
rowHeightListener = e -> adjustRowHeight();
|
||||
}
|
||||
|
||||
ConfigurableColumnTableModel configurableModel = getConfigurableColumnTableModel();
|
||||
if (configurableModel != null) {
|
||||
configurableModel.removeTableModelListener(rowHeightListener);
|
||||
|
@ -1091,16 +1099,17 @@ public class GTable extends JTable {
|
|||
return;
|
||||
}
|
||||
|
||||
SettingsDefinition[] settings =
|
||||
SettingsDefinition[] settingDefs =
|
||||
configurableModel.getColumnSettingsDefinitions(lastPopupColumnIndex);
|
||||
if (settings.length == 0) {
|
||||
if (settingDefs.length == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
SettingsDialog dialog = new SettingsDialog(null);
|
||||
dialog.show(GTable.this,
|
||||
configurableModel.getColumnName(lastPopupColumnIndex) + " Settings", settings,
|
||||
configurableModel.getColumnSettings(lastPopupColumnIndex));
|
||||
String title = configurableModel.getColumnName(lastPopupColumnIndex) + " Settings";
|
||||
Settings settings = configurableModel.getColumnSettings(lastPopupColumnIndex);
|
||||
dialog.show(GTable.this, title, settingDefs, settings);
|
||||
|
||||
((GTableColumnModel) getColumnModel()).saveState();
|
||||
});
|
||||
DockingWindowManager.getHelpService().registerHelp(item, helpLocation);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue