[gnumeric] SheetObjectWidget: don't link dependents too early.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] SheetObjectWidget: don't link dependents too early.
- Date: Fri, 6 Feb 2015 19:50:14 +0000 (UTC)
commit 33b4e72f71f1cad99a379eba46bb3f9d7fab0a42
Author: Morten Welinder <terra gnome org>
Date: Fri Feb 6 14:47:16 2015 -0500
SheetObjectWidget: don't link dependents too early.
Wait until we get a sheet set.
ChangeLog | 9 +++++++++
src/sheet-object-widget.c | 14 +++++++-------
2 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 59fcae6..f03c463 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2015-02-06 Morten Welinder <terra gnome org>
+
+ * src/sheet-object-widget.c (sheet_widget_adjustment_set_link)
+ (sheet_widget_button_set_link, sheet_widget_checkbox_set_link)
+ (sheet_widget_radio_button_set_link)
+ (sheet_widget_list_base_set_links)
+ (sheet_widget_adjustment_set_details): Only link if we have a
+ sheet.
+
2015-02-04 Morten Welinder <terra gnome org>
* configure.ac: Post-release bump.
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index be285df..4f0a1c4 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -1178,7 +1178,7 @@ sheet_widget_button_set_link (SheetObject *so, GnmExprTop const *texpr)
{
SheetWidgetButton *swb = GNM_SOW_BUTTON (so);
dependent_set_expr (&swb->dep, texpr);
- if (NULL != texpr)
+ if (texpr && swb->dep.sheet)
dependent_link (&swb->dep);
}
@@ -1383,7 +1383,7 @@ sheet_widget_adjustment_set_link (SheetObject *so, GnmExprTop const *texpr)
{
SheetWidgetAdjustment *swa = GNM_SOW_ADJUSTMENT (so);
dependent_set_expr (&swa->dep, texpr);
- if (NULL != texpr)
+ if (texpr && swa->dep.sheet)
dependent_link (&swa->dep);
}
@@ -1873,7 +1873,7 @@ sheet_widget_adjustment_set_details (SheetObject *so, GnmExprTop const *tlink,
g_return_if_fail (swa != NULL);
dependent_set_expr (&swa->dep, tlink);
- if (NULL != tlink)
+ if (tlink && swa->dep.sheet)
dependent_link (&swa->dep);
page_size = gtk_adjustment_get_page_size (swa->adjustment); /* ??? */
@@ -2645,7 +2645,7 @@ sheet_widget_checkbox_set_link (SheetObject *so, GnmExprTop const *texpr)
{
SheetWidgetCheckbox *swc = GNM_SOW_CHECKBOX (so);
dependent_set_expr (&swc->dep, texpr);
- if (NULL != texpr)
+ if (texpr && swc->dep.sheet)
dependent_link (&swc->dep);
}
@@ -3100,7 +3100,7 @@ sheet_widget_radio_button_set_link (SheetObject *so, GnmExprTop const *texpr)
{
SheetWidgetRadioButton *swrb = GNM_SOW_RADIO_BUTTON (so);
dependent_set_expr (&swrb->dep, texpr);
- if (NULL != texpr)
+ if (texpr && swrb->dep.sheet)
dependent_link (&swrb->dep);
}
@@ -3720,10 +3720,10 @@ sheet_widget_list_base_set_links (SheetObject *so,
{
SheetWidgetListBase *swl = GNM_SOW_LIST_BASE (so);
dependent_set_expr (&swl->output_dep, output);
- if (NULL != output)
+ if (output && swl->output_dep.sheet)
dependent_link (&swl->output_dep);
dependent_set_expr (&swl->content_dep, content);
- if (NULL != content)
+ if (content && swl->content_dep.sheet)
dependent_link (&swl->content_dep);
list_content_eval (&swl->content_dep); /* populate the list */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]