[gnumeric] Solvers: fix reversed condition.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Solvers: fix reversed condition.
- Date: Sun, 8 Jul 2012 22:27:57 +0000 (UTC)
commit cf7f5771cb1231e11d4c44f010c68d387fcc2514
Author: Morten Welinder <terra gnome org>
Date: Sun Jul 8 18:25:40 2012 -0400
Solvers: fix reversed condition.
We didn't do cross-sheet target cells right.
NEWS | 1 +
plugins/glpk/ChangeLog | 5 +++++
plugins/glpk/gnm-glpk.c | 2 +-
plugins/lpsolve/ChangeLog | 5 +++++
plugins/lpsolve/gnm-lpsolve.c | 2 +-
5 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/NEWS b/NEWS
index 20b0dc0..b2b3fec 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ Morten:
* Teach non-linear solver about constraints. [Part of #620368]
* Avoid too many hash collissions for dense sheets.
* Speed up operations that iterate over cells in large areas.
+ * Fix problems with linear solvers and cross-sheet target.
--------------------------------------------------------------------------
Gnumeric 1.11.4
diff --git a/plugins/glpk/ChangeLog b/plugins/glpk/ChangeLog
index 0245d2c..418c467 100644
--- a/plugins/glpk/ChangeLog
+++ b/plugins/glpk/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-08 Morten Welinder <terra gnome org>
+
+ * gnm-glpk.c (glpk_solver_factory): Fix reversed condition
+ re. cross-sheet target.
+
2012-06-25 Morten Welinder <terra gnome org>
* Release 1.11.4
diff --git a/plugins/glpk/gnm-glpk.c b/plugins/glpk/gnm-glpk.c
index 0e653d4..0fa13d1 100644
--- a/plugins/glpk/gnm-glpk.c
+++ b/plugins/glpk/gnm-glpk.c
@@ -362,7 +362,7 @@ glpk_solver_factory (GnmSolverFactory *factory, GnmSolverParameters *params)
lp->parent = GNM_SUB_SOLVER (res);
gnm_sheet_range_from_value (&lp->srinput,
gnm_solver_param_get_input (params));
- if (lp->srinput.sheet) lp->srinput.sheet = params->sheet;
+ if (!lp->srinput.sheet) lp->srinput.sheet = params->sheet;
g_signal_connect (res, "prepare", G_CALLBACK (gnm_glpk_prepare), lp);
g_signal_connect (res, "start", G_CALLBACK (gnm_glpk_start), lp);
diff --git a/plugins/lpsolve/ChangeLog b/plugins/lpsolve/ChangeLog
index d415352..6a76ad8 100644
--- a/plugins/lpsolve/ChangeLog
+++ b/plugins/lpsolve/ChangeLog
@@ -1,3 +1,8 @@
+2012-07-08 Morten Welinder <terra gnome org>
+
+ * gnm-lpsolve.c (lpsolve_solver_factory): Fix reversed condition
+ re. cross-sheet target.
+
2012-06-25 Morten Welinder <terra gnome org>
* Release 1.11.4
diff --git a/plugins/lpsolve/gnm-lpsolve.c b/plugins/lpsolve/gnm-lpsolve.c
index d8cc59b..4e9150e 100644
--- a/plugins/lpsolve/gnm-lpsolve.c
+++ b/plugins/lpsolve/gnm-lpsolve.c
@@ -356,7 +356,7 @@ lpsolve_solver_factory (GnmSolverFactory *factory, GnmSolverParameters *params)
lp->parent = GNM_SUB_SOLVER (res);
gnm_sheet_range_from_value (&lp->srinput,
gnm_solver_param_get_input (params));
- if (lp->srinput.sheet) lp->srinput.sheet = params->sheet;
+ if (!lp->srinput.sheet) lp->srinput.sheet = params->sheet;
g_signal_connect (res, "prepare", G_CALLBACK (gnm_lpsolve_prepare), lp);
g_signal_connect (res, "start", G_CALLBACK (gnm_lpsolve_start), lp);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]