Add optimization

This commit is contained in:
Robin K 2022-04-13 18:18:39 +02:00
parent a7aaae3d86
commit 574aed6b77
2 changed files with 5 additions and 6 deletions

View File

@ -104,17 +104,13 @@ public class DataCellView extends JLabel implements MouseListener, Serializable
return SettingsManager.getSettings();
}
public void updatePresetPanel() {
tableView.updatePresetPanel();
}
public void drawCell() {
if(tableView == null || tableView.isHidden()) {
// Table will be null in the static case.
return;
}
updatePresetPanel();
tableView.updatePresetPanel();
this.invalidate();
setFont(getSettings().getTableFont());
setText(getCellText());

View File

@ -171,7 +171,10 @@ public class PresetPanel extends JPanel {
}
//Make sure we update all other checkboxes
view.updatePresetPanel();
//DataCellView usually calls this, but we dont have any DataCell
//if we are hidden
if(view.isHidden())
view.updatePresetPanel();
}
}
}