From a501616a87ff0931453a9e2ce41585b7cbc9df63 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Fri, 2 Jan 2009 12:43:21 +0000 Subject: [PATCH] Transitioned TimelineLayoutHelper::get_track_header_rect to return weak_ptr --- src/gui/widgets/timeline/timeline-layout-helper.cpp | 4 ++-- src/gui/widgets/timeline/timeline-layout-helper.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/timeline/timeline-layout-helper.cpp b/src/gui/widgets/timeline/timeline-layout-helper.cpp index 299be4c4a..8ab9b8978 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.cpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.cpp @@ -87,7 +87,7 @@ TimelineLayoutHelper::get_track_header_rect( return optional(); } -weak_ptr +shared_ptr TimelineLayoutHelper::header_from_point(const Gdk::Point &point) { std::pair, Gdk::Rectangle> pair; @@ -100,7 +100,7 @@ TimelineLayoutHelper::header_from_point(const Gdk::Point &point) point.get_x() < rect.get_x() + rect.get_width() && point.get_y() >= rect.get_y() && point.get_y() < rect.get_y() + rect.get_height()) - return pair.first; + return shared_ptr(pair.first); } // No track was found - return an empty pointer diff --git a/src/gui/widgets/timeline/timeline-layout-helper.hpp b/src/gui/widgets/timeline/timeline-layout-helper.hpp index 3e9d77145..6ca659365 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.hpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.hpp @@ -69,7 +69,7 @@ public: boost::optional get_track_header_rect( boost::weak_ptr track); - boost::weak_ptr header_from_point( + boost::shared_ptr header_from_point( const Gdk::Point &point); boost::shared_ptr track_from_y(const int y);