[gegl/soc-2013-n-point-deformation: 19/28] libs: npd: reset weights when # of control points is 0 and MLS mode is on



commit f7f86272a63e427a8ebca4427f957d560a286a4d
Author: Marek Dvoroznak <dvoromar gmail com>
Date:   Thu Aug 22 04:56:07 2013 +0200

    libs: npd: reset weights when # of control points is 0 and MLS mode is on

 libs/npd/npd_common.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libs/npd/npd_common.c b/libs/npd/npd_common.c
index 3c9c4d1..81544fc 100644
--- a/libs/npd/npd_common.c
+++ b/libs/npd/npd_common.c
@@ -435,7 +435,11 @@ npd_compute_MLS_weights (NPDModel *model)
   gfloat                min, SED, MLS_weight;
   gint                  i, j;
 
-  if (model->control_points->len == 0) return;
+  if (model->control_points->len == 0)
+    {
+      npd_reset_weights (hm);
+      return;
+    }
 
   for (i = 0; i < hm->num_of_overlapping_points; i++)
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]