The following commit has been merged in the master branch:
commit ff96facfa18ba3cd028ee9ef4ac36c8aa71c94f7
Author: Andrei Zavada <[email protected]>
Date:   Mon Apr 22 01:25:47 2013 +0300

    all annotations and artifacts have ts relative to recording start

diff --git a/src/ui/sf/channel.cc b/src/ui/sf/channel.cc
index c249d96..9268f9a 100644
--- a/src/ui/sf/channel.cc
+++ b/src/ui/sf/channel.cc
@@ -460,9 +460,13 @@ aghui::SScoringFacility::SChannel::
 mark_region_as_artifact( bool do_mark)
 {
        if ( do_mark )
-               crecording.F().artifacts(_h).mark_artifact( 
selection_start_time, selection_end_time);
+               crecording.F().artifacts(_h).mark_artifact(
+                       selection_start_time - crecording.F().start_time(),
+                       selection_end_time - crecording.F().start_time());
        else
-               crecording.F().artifacts(_h).clear_artifact( 
selection_start_time, selection_end_time);
+               crecording.F().artifacts(_h).clear_artifact(
+                       selection_start_time - crecording.F().start_time(),
+                       selection_end_time - crecording.F().start_time());
 
        calculate_dirty_percent();
 
@@ -486,7 +490,7 @@ mark_region_as_annotation( const string& label, 
sigfile::SAnnotation::TType type
 {
        sigfile::mark_annotation(
                crecording.F().annotations(_h),
-               selection_start_time, selection_end_time,
+               selection_start_time - crecording.F().start_time(), 
selection_end_time - crecording.F().start_time(),
                label,
                type);
 }
diff --git a/src/ui/sf/montage.cc b/src/ui/sf/montage.cc
index 8332177..3629956 100644
--- a/src/ui/sf/montage.cc
+++ b/src/ui/sf/montage.cc
@@ -441,8 +441,8 @@ draw_page( cairo_t *cr,
 
        double  half_pad = _p.pagesize() * _p.skirting_run_per1;
 
-       double  cvpa = _p.cur_xvpage_start(),
-               cvpe = _p.cur_xvpage_end(),
+       double  cvpa = _p.cur_xvpage_start() - crecording.F().start_time(),
+               cvpe = _p.cur_xvpage_end() - crecording.F().start_time(),
                evpz = cvpe - cvpa;
       // artifacts (changed bg)
        {

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to