initialize the motif_editor with analysis motifs
[mussa.git] / qui / motif_editor / MotifEditor.cpp
index 93178d673faf069bfea426f025f3ca85c47c8436..ea10650ee84aea7cfdf68fcd55e78e81ef334e66 100644 (file)
@@ -21,7 +21,7 @@ MotifEditor::MotifEditor(MussaRef m, QWidget *parent)
   vector<Sequence> motif_seq(motif.begin(), motif.end());
 
   applyButton->setFocusPolicy(Qt::StrongFocus);
-  connect(applyButton, SIGNAL(clicked()), this, SLOT(updateMotifs()));
+  connect(applyButton, SIGNAL(clicked()), this, SLOT(updateAnalysisMotifs()));
   button_layout->addStretch();
   button_layout->addWidget(applyButton);
   
@@ -37,10 +37,8 @@ MotifEditor::MotifEditor(MussaRef m, QWidget *parent)
 
 void MotifEditor::updateModel()
 {
-  MotifModel *new_model = new MotifModel();
+  MotifModel *new_model = new MotifModel(analysis);
    
-  new_model->push_empty();
-
   // if there was an old model, delete it
   if (model) {
     delete model;
@@ -51,7 +49,7 @@ void MotifEditor::updateModel()
   updateView();
 }
 
-void MotifEditor::updateMotifs()
+void MotifEditor::updateAnalysisMotifs()
 {
   // This function is _sooo_ not thread safe
   // erase motifs