]> err.no Git - libchamplain/commitdiff
Fix bug 580785: decel-rate of a view is not set correctly
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 30 Apr 2009 03:09:45 +0000 (23:09 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Thu, 30 Apr 2009 03:09:45 +0000 (23:09 -0400)
by inversing the conditions and making the param spec consistent.

champlain/champlain-view.c

index 9dc7f0e2571d8c4085595aa387100deb67344be2..ea45fc5d32278d740b672e06ece515a89f7bd014 100644 (file)
@@ -662,7 +662,7 @@ champlain_view_class_init (ChamplainViewClass *champlainViewClass)
        g_param_spec_double ("decel-rate",
             "Deceleration rate",
             "Rate at which the view will decelerate in kinetic mode.",
-            1.0, 2.0, 1.1, CHAMPLAIN_PARAM_READWRITE));
+            0.0, 2.0, 1.1, CHAMPLAIN_PARAM_READWRITE));
 
   /**
   * ChamplainView:keep-center-on-resize:
@@ -1571,8 +1571,8 @@ champlain_view_set_decel_rate (ChamplainView *view,
     gdouble rate)
 {
   g_return_if_fail (CHAMPLAIN_IS_VIEW (view) &&
-      rate > 2.0 &&
-      rate 0);
+      rate < 2.0 &&
+      rate > 0.0);
 
   ChamplainViewPrivate *priv = view->priv;