Modified trackMap to map shared_ptr<model::Track> not model::Track*

This commit is contained in:
Joel Holdsworth 2008-12-20 11:45:23 +00:00
parent 715f76bc8d
commit aafa600422
2 changed files with 6 additions and 6 deletions

View file

@ -328,12 +328,11 @@ TimelineWidget::create_timeline_tracks_from_branch(
REQUIRE(model_track);
// Is a timeline UI track present in the map already?
const model::Track *track = model_track.get();
if(!contains(trackMap, track))
if(!contains(trackMap, model_track))
{
// The timeline UI track is not present
// We will need to create one
trackMap[model_track.get()] =
trackMap[model_track] =
create_timeline_track_from_model_track(model_track);
}
@ -365,8 +364,8 @@ TimelineWidget::lookup_timeline_track(
shared_ptr<model::Track> model_track)
{
REQUIRE(sequence);
std::map<const model::Track*, shared_ptr<timeline::Track> >::
const_iterator iterator = trackMap.find(model_track.get());
std::map<shared_ptr<model::Track>, shared_ptr<timeline::Track> >::
const_iterator iterator = trackMap.find(model_track);
if(iterator == trackMap.end())
{
// The track is not present in the map

View file

@ -251,7 +251,8 @@ protected:
* widget is updated with update_tracks, timeline tracks are added and
* removed from the map in correspondance with the tree.
**/
std::map<const model::Track*, boost::shared_ptr<timeline::Track> >
std::map<boost::shared_ptr<model::Track>,
boost::shared_ptr<timeline::Track> >
trackMap;
// View State