X-Git-Url: http://woldlab.caltech.edu/gitweb/?a=blobdiff_plain;f=alg%2Fglseqbrowser.cpp;h=107099bd824105df653a994699472f3a122cf2fb;hb=55f0a3e9612b3e1df2c588682d7f605203eab421;hp=e9d55b985571fa2785fca31c10ee480bc8cefbd6;hpb=7d4fbcb6060a60a8ea25ca1303fcaaaf8574f24a;p=mussa.git diff --git a/alg/glseqbrowser.cpp b/alg/glseqbrowser.cpp index e9d55b9..107099b 100644 --- a/alg/glseqbrowser.cpp +++ b/alg/glseqbrowser.cpp @@ -308,14 +308,14 @@ double GlSeqBrowser::zoom() const return zoom_level; } -void GlSeqBrowser::setColorMapper(boost::shared_ptr cm) +void GlSeqBrowser::setColorMapper(AnnotationColorsRef cm) { color_mapper = cm; } -const AnnotationColors& GlSeqBrowser::colorMapper() +const AnnotationColorsRef GlSeqBrowser::colorMapper() { - return *color_mapper; + return color_mapper; } void GlSeqBrowser::clear() @@ -336,32 +336,36 @@ void GlSeqBrowser::clear_selection() void GlSeqBrowser::push_sequence(const Sequence& s) { - GlSequence gs(s, color_mapper); + GlSequenceRef gs(new GlSequence(s, color_mapper)); push_sequence(gs); } -void GlSeqBrowser::push_sequence(boost::shared_ptr s) +void GlSeqBrowser::push_sequence(SequenceRef s) { - boost::shared_ptr gs(new GlSequence(*s, color_mapper)); + GlSequenceRef gs(new GlSequence(*s, color_mapper)); push_sequence(gs); } void GlSeqBrowser::push_sequence(GlSequence gs) { - boost::shared_ptr new_gs(new GlSequence(gs)); + GlSequenceRef new_gs(new GlSequence(gs)); push_sequence(new_gs); } -void GlSeqBrowser::push_sequence(boost::shared_ptr gs) +void GlSeqBrowser::push_sequence(GlSequenceRef gs) { + GlSequenceRef new_gs(new GlSequence(gs)); + // mark where the sequence is + new_gs->add_annotations_for_defined_sequence(draw_track); + clear_links(); - track_container.push_back(gs); + track_container.push_back(new_gs); update_layout(); if (track_container.size() > 1) path_segments.push_back(pair_segment_map()); } -const std::vector >& GlSeqBrowser::sequences() const +const std::vector& GlSeqBrowser::sequences() const { return track_container; }