Skip to content

Commit

Permalink
reload ExplanationManager whenever the preference dialog is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
stefborg committed May 27, 2024
1 parent feca297 commit 76c63ad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public boolean hasExplanation(OWLAxiom axiom) {
}

public void handleExplain(Frame owner, OWLAxiom axiom) {
reload();
final ExplanationDialog explanation = new ExplanationDialog(this, axiom);
openedExplanations.add(explanation);
JOptionPane op = new JOptionPane(explanation, JOptionPane.PLAIN_MESSAGE, JOptionPane.DEFAULT_OPTION);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,19 @@ public void initialise() throws Exception {
add(panel, BorderLayout.NORTH);
addDefaultExplanationServiceComponent(panel);
addInstalledExplanationServicesComponent(panel);
getOWLEditorKit().getModelManager().getExplanationManager().reload();
loadFrom(ExplanationPreferences.create().load());
}

@Override
public void dispose() throws Exception {
getOWLEditorKit().getModelManager().getExplanationManager().reload();
}

@Override
public void applyChanges() {
ExplanationPreferences prefs = ExplanationPreferences.create();
saveTo(prefs);
prefs.save();
getOWLEditorKit().getModelManager().getExplanationManager().reload();
}

private void loadFrom(ExplanationPreferences prefs) {
Expand Down

0 comments on commit 76c63ad

Please sign in to comment.