- MotifModel *new_model = new MotifModel(analysis);
-
- // if there was an old model, delete it
- if (model) {
+ // if our current analysis doesn't match the one in our
+ // model, we probalby changed the analysis.
+ // so delete and restart
+ if (model and model->getAnalysis() != analysis) {