[med-svn] [SCM] aghermann branch, master, updated. 2523fe1ce5b3da7059d8e7aa2f2a4251854704cf

Andrei Zavada johnhommer at gmail.com
Mon Jul 22 23:31:24 UTC 2013


The following commit has been merged in the master branch:
commit db10ac88a2f6e95267f18a7e253d1304f393ed23
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Mon Jul 22 02:14:26 2013 +0300

    MW: Change pixels-per-hour with Shift+Scroll

diff --git a/ChangeLog b/ChangeLog
index 7d125f0..af8847d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,7 +9,9 @@ v.0.9.1 (2013-xx-xx)
 	* New tool agh-profile-gen, a standalone profile generator.
 	* ascii (tsv) format support, including irregular, timestamped
 	  time series data.
-	* Score assistant now uses delta and theta ranges as defined by user.
+	* Score assistant now uses delta and theta ranges as defined by
+	  user.
+	* MW: Change pixels-per-hour with Shift+Scroll.
 
 v.0.9.0.4 (2013-05-18)
 	* Remove stray AC_CHECK_FUNC(mremap).
diff --git a/src/aghermann/ui/mw/measurements_cb.cc b/src/aghermann/ui/mw/measurements_cb.cc
index c2b2de1..35848db 100644
--- a/src/aghermann/ui/mw/measurements_cb.cc
+++ b/src/aghermann/ui/mw/measurements_cb.cc
@@ -129,16 +129,20 @@ daSubjectTimeline_scroll_event_cb(
 	auto& J = *(SExpDesignUI::SSubjectPresentation*)userdata;
 	auto& ED = J._p._p;
 
-	if ( event->state & GDK_CONTROL_MASK &&
-	     event->state & GDK_SHIFT_MASK ) {
-		ED.modify_profile_scales( event->direction);
+	if ( event->state & GDK_SHIFT_MASK ) {
+		switch ( event->direction ) {
+		case GDK_SCROLL_UP:   --ED.tl_pph; break;
+		case GDK_SCROLL_DOWN: ++ED.tl_pph; break;
+		default: break;
+		}
 		gtk_widget_queue_draw( (GtkWidget*)ED.cMeasurements);
 		return TRUE;
 
 	} else if ( event->state & GDK_CONTROL_MASK ) {
-		ED.modify_active_profile_scale( event->direction);
+		ED.modify_profile_scales( event->direction);
 		gtk_widget_queue_draw( (GtkWidget*)ED.cMeasurements);
 		return TRUE;
+
 	} else
 		return FALSE;
 }

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list