Skip to content

Commit

Permalink
Fix update issue on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
prasser committed Jan 7, 2021
1 parent bcd454b commit a1fb002
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,20 +234,28 @@ public void reset() {

@Override
public void update(ModelEvent event) {

// Model update
if (event.part == ModelPart.MODEL) {
this.model = (Model)event.data;
}

// Other updates
if (event.part == ModelPart.CRITERION_DEFINITION ||
event.part == ModelPart.ATTRIBUTE_TYPE ||
event.part == ModelPart.ATTRIBUTE_TYPE_BULK_UPDATE ||
event.part == ModelPart.MODEL) {

// Update table
if (model!=null) {
updateTable();
}
}
}

/**
* Update table
*/
private void updateTable() {

root.setRedraw(false);
Expand Down Expand Up @@ -351,8 +359,10 @@ public int compare(ModelRiskBasedCriterion o1, ModelRiskBasedCriterion o2) {
item.setData(c);
}

// Update
layout.updateButtons();
root.setRedraw(true);
SWTUtil.enable(root);
table.redraw();
}
}

0 comments on commit a1fb002

Please sign in to comment.