Skip to content

Commit

Permalink
Fix error while reading settings parameters : Add possibility to clea…
Browse files Browse the repository at this point in the history
…r a ParametersComboPanel.
  • Loading branch information
VeroDup committed Jun 28, 2021
1 parent 44e524e commit 43a6724
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,15 @@ public void itemStateChanged(ItemEvent ie) {
});

}

public void clearPanel() {
updatePanel(true);
}

public void updatePanel() {
updatePanel(false);
}

private void updatePanel(boolean clearItem) {

m_selectedParametersPanel.removeAll();
m_comboBox.removeAllItems();
Expand All @@ -79,7 +85,8 @@ public void updatePanel() {
int nbParameters = m_parameters.length;
for (int i = 0; i < nbParameters; i++) {
final AbstractParameter p = m_parameters[i];

if((p != null) && clearItem)
p.setUsed(false);
if ((p != null) && (p.isUsed())) {

c.gridx = 0;
Expand Down

0 comments on commit 43a6724

Please sign in to comment.