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

Andrei Zavada johnhommer at gmail.com
Thu Jul 25 19:59:05 UTC 2013


The following commit has been merged in the master branch:
commit 83708be71a07c55dc7a3b5e3e7162fbdf896adf6
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Wed Jul 24 00:25:47 2013 +0300

    MW: recalculate profile drawing area width on Shifh+Scroll

diff --git a/src/aghermann/ui/mw/measurements_cb.cc b/src/aghermann/ui/mw/measurements_cb.cc
index 35848db..94910e1 100644
--- a/src/aghermann/ui/mw/measurements_cb.cc
+++ b/src/aghermann/ui/mw/measurements_cb.cc
@@ -131,10 +131,18 @@ daSubjectTimeline_scroll_event_cb(
 
 	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;
+		case GDK_SCROLL_UP:   if ( ED.tl_pph > 3 ) --ED.tl_pph; break;
+		case GDK_SCROLL_DOWN:                      ++ED.tl_pph; break;
 		default: break;
 		}
+		ED.tl_width = (ED.timeline_end - ED.timeline_start) / 3600 * ED.tl_pph;
+		for ( auto &G : ED.groups )
+			for ( auto &J : G )
+				g_object_set(
+					(GObject*)J.da,
+					"width-request", ED.tl_width + ED.tl_left_margin + ED.tl_right_margin,
+					NULL);
+
 		gtk_widget_queue_draw( (GtkWidget*)ED.cMeasurements);
 		return TRUE;
 

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list