Skip to content

Commit

Permalink
SwingUI Constraint matches dialog now redraws correctly when viewed m…
Browse files Browse the repository at this point in the history
…ultiple times in a single solver run
  • Loading branch information
oskopek committed Aug 21, 2015
1 parent 196f966 commit c82ed7b
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -56,6 +56,14 @@ public ConstraintMatchesDialog(SolverAndPersistenceFrame solverAndPersistenceFra
this.solutionBusiness = solutionBusiness;
}

@Override
public void setVisible(boolean visible) {
if (!visible) {
setContentPane(new JPanel()); // force redraw on visible(true)
}
super.setVisible(visible);
}

public void resetContentPanel() {
if (!solutionBusiness.isConstraintMatchEnabled()) {
setContentPane(new JLabel("Constraint matches are not supported with this ScoreDirector."));
Expand Down

0 comments on commit c82ed7b

Please sign in to comment.