From 6266847b43ee6a39d0a7c047796423bb4d06a1c3 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Tue, 17 Oct 2006 18:47:49 +0000 Subject: [PATCH] always add a blank motif ticket:186 given the way the motif editor automatically adds motifs its important to make sure there's a blank one for users to start editing with. --- qui/motif_editor/MotifModel.cpp | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/qui/motif_editor/MotifModel.cpp b/qui/motif_editor/MotifModel.cpp index 81bd954..5bf0ad1 100644 --- a/qui/motif_editor/MotifModel.cpp +++ b/qui/motif_editor/MotifModel.cpp @@ -8,19 +8,16 @@ MotifModel::MotifModel(MussaRef m, QObject *parent) const std::set& motif_set = m->motifs(); boost::shared_ptr cm = m->colorMapper(); - if (motif_set.size() == 0) { - push_empty(); - } else { - std::set::const_iterator motif_i; - for(motif_i = motif_set.begin(); - motif_i != motif_set.end(); - ++motif_i) - { - // ideally we'd know what the motif color was? - MotifElement new_element(*motif_i, cm->lookup("motif", motif_i->get_sequence())); - push_back(new_element); - } + std::set::const_iterator motif_i; + for(motif_i = motif_set.begin(); + motif_i != motif_set.end(); + ++motif_i) + { + // ideally we'd know what the motif color was? + MotifElement new_element(*motif_i, cm->lookup("motif", motif_i->get_sequence())); + push_back(new_element); } + push_empty(); } void MotifModel::assign( -- 2.30.2