mirror of
https://github.com/correl/mage.git
synced 2024-12-26 11:09:27 +00:00
Fixed NPE in the Tables panel.
This commit is contained in:
parent
5717844297
commit
ffaffa39f8
1 changed files with 11 additions and 9 deletions
|
@ -1199,6 +1199,7 @@ class TableTableModel extends AbstractTableModel {
|
||||||
|
|
||||||
// set the column width from saved value or defaults
|
// set the column width from saved value or defaults
|
||||||
int[] widths = Util.getIntArrayFromString(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_COLUMNS_WIDTH, null));
|
int[] widths = Util.getIntArrayFromString(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_COLUMNS_WIDTH, null));
|
||||||
|
if (widths != null) {
|
||||||
int lengthW = widths.length;
|
int lengthW = widths.length;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (int width : defaultColumnsWidth) {
|
for (int width : defaultColumnsWidth) {
|
||||||
|
@ -1209,6 +1210,7 @@ class TableTableModel extends AbstractTableModel {
|
||||||
column.setWidth(width);
|
column.setWidth(width);
|
||||||
column.setPreferredWidth(width);
|
column.setPreferredWidth(width);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// set the column order
|
// set the column order
|
||||||
int[] order = Util.getIntArrayFromString(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_COLUMNS_ORDER, null));
|
int[] order = Util.getIntArrayFromString(PreferencesDialog.getCachedValue(PreferencesDialog.KEY_TABLES_COLUMNS_ORDER, null));
|
||||||
|
|
Loading…
Reference in a new issue