fix problems with motif changes not showing up in sequencebrowser
authorDiane Trout <diane@caltech.edu>
Tue, 3 Apr 2007 23:39:44 +0000 (23:39 +0000)
committerDiane Trout <diane@caltech.edu>
Tue, 3 Apr 2007 23:39:44 +0000 (23:39 +0000)
commit8b38b5bc63e5c62983d0814aa75d3f88b9116e49
tree9b7bfa44ca1a4934f044166e3575978458719366
parent4b9dd885cdfef6d73c82bae5f112a063588766a9
fix problems with motif changes not showing up in sequencebrowser
This patch adds a couple of new unit test cases to make sure that
when the motif sequence list is changed it is actually reflected
in the sequence browser.

The problem was that when I originally coded it, a GlSequence held
a shared_ptr<Sequence> so even though SequenceBrowser had new copies
of GlSequence, the underlying Sequence was still shared.

The change to GlSequence being a subclass of Sequence with a copy
of the motif_list meant that changes to the motif_list in one
copy weren't reflected in the copy held by the SequenceBrowser.

I fixed it by changing sequence to hold a shared_ptr<list<motif> >.
the downside is that that the motif_list is now always shared
between copies of a Sequence, which is likely to cause problems
when opening a second mussa window.

However since I plan on tossing the current annotation and motif handling
code at some point in the near future, this patch should be "good
enough".
16 files changed:
alg/annotation_colors.hpp
alg/glseqbrowser.cpp
alg/glseqbrowser.hpp
alg/glsequence.cpp
alg/glsequence.hpp
alg/mussa.cpp
alg/sequence.cpp
alg/sequence.hpp
alg/test/test_glseqbrowser.cpp
alg/test/test_sequence.cpp
qui/motif_editor/test/TestMotifEditor.hpp
qui/seqbrowser/SequenceBrowserWidget.cpp
qui/seqbrowser/SequenceBrowserWidget.hpp
qui/seqbrowser/test/CMakeLists.txt
qui/seqbrowser/test/TestSequenceBrowserWidget.cpp [new file with mode: 0644]
qui/seqbrowser/test/TestSequenceBrowserWidget.hpp [new file with mode: 0644]