Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto select option when adding an "Auto concept ID column" #143

Merged
merged 2 commits into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/org/ohdsi/usagi/ui/FilterPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ public boolean getFilterByAuto() {
return filterByAutoCheckBox.isSelected();
}

public void setFilterByAuto() {
filterByAutoCheckBox.setSelected(true);
}

public boolean getFilterStandard() {
return filterStandardCheckBox.isSelected();
}
Expand Down
5 changes: 5 additions & 0 deletions src/org/ohdsi/usagi/ui/ImportDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ private Component createColumnMappingPanel() {
autoConceptIdColumn = new JComboBox<>(comboBoxOptions);
autoConceptIdColumn.setToolTipText("The column containing a (semicolon-delimited) list of concept IDs to which the search will be restricted");
columnMappingPanel.add(autoConceptIdColumn, cBox);
autoConceptIdColumn.addActionListener(e -> {
if (!autoConceptIdColumn.getSelectedItem().toString().equals("")) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usually .isEmpty() is used for this check.

filterPanel.setFilterByAuto();
}
});

gridY = cLabel.gridy + 1;
addExtraColumnMapping();
Expand Down