The following commit has been merged in the master branch:
commit 4e6ab3b42409fd3a187b64559fa7fc9e1ea993ca
Author: Andrei Zavada <[email protected]>
Date:   Sat Sep 29 02:34:44 2012 +0300

    SF: prevent going above max computed freq when scrolling on PSD profile

diff --git a/src/ui/scoring-facility-montage_cb.cc 
b/src/ui/scoring-facility-montage_cb.cc
index f7c393e..768f64d 100644
--- a/src/ui/scoring-facility-montage_cb.cc
+++ b/src/ui/scoring-facility-montage_cb.cc
@@ -375,8 +375,9 @@ daSFMontage_scroll_event_cb( GtkWidget *wid, GdkEventScroll 
*event, gpointer use
                                                        
Ch->update_profile_display_scales();
                                                gtk_widget_queue_draw( wid);
                                        }
-                               } else
-                                       if ( Ch->psd.upto < 18. ) {
+                               } else {
+                                       auto& R = Ch->crecording;
+                                       if ( Ch->psd.upto < R.binsize * 
R.CBinnedPower::bins() ) {
                                                Ch->psd.from += .5;
                                                Ch->psd.upto += .5;
                                                Ch->get_psd_course( false);
@@ -384,6 +385,7 @@ daSFMontage_scroll_event_cb( GtkWidget *wid, GdkEventScroll 
*event, gpointer use
                                                        
Ch->update_profile_display_scales();
                                                gtk_widget_queue_draw( wid);
                                        }
+                               }
                                break;
                        case GDK_SCROLL_LEFT:
                        case GDK_SCROLL_RIGHT:

-- 
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