[gnumeric] solver: without pre-existing target, just add the edit position
- From: Andreas J. Guelzow <guelzow src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] solver: without pre-existing target, just add the edit position
- Date: Sun, 4 Jul 2010 16:52:32 +0000 (UTC)
commit dbf6fdd7b88ce4627c9d4821c1ac2506fe040593
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date: Sun Jul 4 10:52:12 2010 -0600
solver: without pre-existing target, just add the edit position
2010-07-04 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-solver.c (dialog_init): If we have no existing target we
should add only the edit position not the whole selection.
src/dialogs/ChangeLog | 5 +++++
src/dialogs/dialog-solver.c | 11 ++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 49cac1d..53cff53 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,6 +1,11 @@
2010-07-04 Andreas J. Guelzow <aguelzow pyrshep ca>
* dialog-solver.c (dialog_init): If we have no existing target we
+ should add only the edit position not the whole selection.
+
+2010-07-04 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+ * dialog-solver.c (dialog_init): If we have no existing target we
should add the selection.
2010-07-04 Morten Welinder <terra gnome org>
diff --git a/src/dialogs/dialog-solver.c b/src/dialogs/dialog-solver.c
index df216fa..b5ccabb 100644
--- a/src/dialogs/dialog-solver.c
+++ b/src/dialogs/dialog-solver.c
@@ -35,6 +35,7 @@
#include <value.h>
#include <cell.h>
#include <sheet.h>
+#include <sheet-view.h>
#include <expr.h>
#include <wbc-gtk.h>
#include <workbook.h>
@@ -1129,12 +1130,12 @@ dialog_init (SolverState *state)
gnm_expr_entry_load_from_text (state->target_entry,
cell_name (target_cell));
else {
- GnmRange const*first = selection_first_range
- (wb_control_cur_sheet_view
- (WORKBOOK_CONTROL (state->wbcg)), NULL, NULL);
- if (first != NULL) {
+ SheetView *sv = wb_control_cur_sheet_view
+ (WORKBOOK_CONTROL (state->wbcg));
+ if (sv) {
+ GnmRange first = {sv->edit_pos, sv->edit_pos};
gnm_expr_entry_load_from_range (state->target_entry,
- state->sheet, first);
+ state->sheet, &first);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]