Skip to content

Commit

Permalink
#52: always execute disableRequiredPropCheckBoxes() when updating pan…
Browse files Browse the repository at this point in the history
…el list in the report UI
  • Loading branch information
FelipeFcosta committed Feb 13, 2023
1 parent 31dae56 commit ad2034f
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,14 @@ protected ColumnsSelectReportUI() {
} else {
columnsManager.checkOnlySelectedProperties(Arrays.asList(basicReportProps));
}
disableRequiredPropertiesCheckBoxes();
updatePanelList();
}

@Override
public void actionPerformed(ActionEvent e) {
super.actionPerformed(e);
if (e.getSource().equals(selectVisibleButton)) {
disableRequiredPropertiesCheckBoxes();
updatePanelList();
} else if (e.getSource().equals(clearButton)) {
if (e.getSource().equals(clearButton)) {
columnsManager.uncheckAllProperties();
disableRequiredPropertiesCheckBoxes();
updatePanelList();
} else if (e.getSource() instanceof JCheckBox || e.getSource().equals(selectVisibleButton)) {
if (columnsManager.getSelectedProperties().size() > PROPERTIES_LIMIT_NUM) {
Expand All @@ -109,6 +104,13 @@ public void actionPerformed(ActionEvent e) {
}
}

@Override
protected void updatePanelList() {
disableRequiredPropertiesCheckBoxes();
super.updatePanelList();
}


public void disableRequiredPropertiesCheckBoxes() {
columnsManager.allCheckBoxesState.put(IndexItem.ID_IN_SOURCE, new CheckBoxState(true, false));
columnsManager.allCheckBoxesState.put(BasicProps.PATH, new CheckBoxState(true, false));
Expand Down

0 comments on commit ad2034f

Please sign in to comment.