[gnumeric] Unselect sheet objects on closing to avoid leaks. [#688094]



commit 3e47168ac104f82bdc600c98c2f1fe3bdd0b6ae7
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sun Nov 11 17:45:04 2012 +0100

    Unselect sheet objects on closing to avoid leaks. [#688094]

 ChangeLog               |    7 +++++++
 NEWS                    |    1 +
 src/item-cursor.c       |    2 +-
 src/sheet-control-gui.c |    1 +
 4 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ac24034..95047bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-11-11  Jean Brefort  <jean brefort normalesup org>
+
+	* src/item-cursor.c (item_cursor_draw): always draw the double line of
+	the selection rectangle, even if top and bottom are out of sight.
+	* src/sheet-control-gui.c (scg_finalize): unselect objects so that they
+	are correctly unrefed. [#688094]
+
 2012-11-10  Andreas J. Guelzow <aguelzow pyrshep ca>
 
 	* src/gnumeric-conf.h: updated
diff --git a/NEWS b/NEWS
index 48c54c3..ba15700 100644
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ Jean:
 	* Do not use filtered out values in graphs. [#687209]
 	* Fixed crash on interprocess image copying. [#687414]
 	*ÂFix sheet focus after resizing. [#687188]
+	* Unselect sheet objects on closing to avoid leaks. [#688094]
 
 Morten:
 	* Fix xlsx save performance problems.  [#662058]  [#685530]
diff --git a/src/item-cursor.c b/src/item-cursor.c
index ad2a879..ae9e6b8 100644
--- a/src/item-cursor.c
+++ b/src/item-cursor.c
@@ -368,7 +368,7 @@ item_cursor_draw (GocItem const *item, cairo_t *cr)
 		cairo_stroke (cr);
 	}
 
-	if (draw_external && draw_internal && draw_handle) {
+	if (draw_external && draw_internal) {
 		if (draw_handle < 2) {
 			points [0].x -= 2;
 			points [1].x -= 2;
diff --git a/src/sheet-control-gui.c b/src/sheet-control-gui.c
index 2a58ee6..3f672c0 100644
--- a/src/sheet-control-gui.c
+++ b/src/sheet-control-gui.c
@@ -1766,6 +1766,7 @@ scg_finalize (GObject *object)
 	GSList *ptr;
 
 	/* remove the object view before we disappear */
+	scg_object_unselect (scg, NULL);
 	if (*scg->pane)
 		for (ptr = sheet->sheet_objects; ptr != NULL ; ptr = ptr->next )
 			SCG_FOREACH_PANE (scg, pane,



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