Skip to content

Commit

Permalink
fixes #45
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Moinat committed May 14, 2020
1 parent e8932b0 commit 9be7e0c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/org/ohdsi/usagi/ui/DataChangeListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@

public interface DataChangeListener {

public static DataChangeEvent APPROVE_EVENT = new DataChangeEvent(true, false);
public static DataChangeEvent SIMPLE_UPDATE_EVENT = new DataChangeEvent(false, false);
public static DataChangeEvent RESTRUCTURE_EVENT = new DataChangeEvent(false, true);
DataChangeEvent APPROVE_EVENT = new DataChangeEvent(true, false);
DataChangeEvent SIMPLE_UPDATE_EVENT = new DataChangeEvent(false, false);
DataChangeEvent RESTRUCTURE_EVENT = new DataChangeEvent(false, true);

public void dataChanged(DataChangeEvent event);
void dataChanged(DataChangeEvent event);

public static class DataChangeEvent {
class DataChangeEvent {
public DataChangeEvent(boolean approved, boolean structureChange) {
this.approved = approved;
this.structureChange = structureChange;
}

public boolean approved = false;
public boolean structureChange = false;
public boolean approved;
public boolean structureChange;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import javax.swing.filechooser.FileNameExtensionFilter;

import org.ohdsi.usagi.CodeMapping;
import org.ohdsi.usagi.ui.DataChangeListener;
import org.ohdsi.usagi.ui.Global;
import org.ohdsi.usagi.ui.Mapping;

Expand Down Expand Up @@ -79,6 +80,7 @@ public void actionPerformed(ActionEvent arg0) {
+ " were applied to the current mapping and " + mappingsAdded + " were newly added.";
Global.mappingTablePanel.updateUI();
Global.mappingDetailPanel.updateUI();
Global.mapping.fireDataChanged(DataChangeListener.APPROVE_EVENT); // To update the footer
if (mappingsAdded > 0) {
Global.usagiSearchEngine.close();
Global.usagiSearchEngine.createDerivedIndex(Global.mapping.getSourceCodes(), Global.frame);
Expand Down

0 comments on commit 9be7e0c

Please sign in to comment.