summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2006-04-29 15:42:18 +0000
committermental <mental@users.sourceforge.net>2006-04-29 15:42:18 +0000
commit1700908e2a089a422dacc9120fc8e5ed9dfd1d17 (patch)
treeee8f279811f7960a18cb27e8919d72d0b70460bf
parentremove warnings (diff)
downloadinkscape-1700908e2a089a422dacc9120fc8e5ed9dfd1d17.tar.gz
inkscape-1700908e2a089a422dacc9120fc8e5ed9dfd1d17.zip
since the view and document are both managed by the collector, reffing the document from the view is totally unnecessary
(bzr r617)
-rw-r--r--ChangeLog7
-rw-r--r--src/ui/view/view.cpp4
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d4d316430..a44b9d39c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2006-04-29 MenTaLguY <mental@rydia.net>
+ * src/ui/view/view.cpp:
+
+ Wait a minute -- UI::View::View and SPDocument are both managed
+ by the collector -- the view doesn't need to ref the document!
+
+2006-04-29 MenTaLguY <mental@rydia.net>
+
* src/ui/view/view.cpp: add missing unref
2006-04-29 MenTaLguY <mental@rydia.net>
diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp
index 48c48c750..04158ddbd 100644
--- a/src/ui/view/view.cpp
+++ b/src/ui/view/view.cpp
@@ -97,7 +97,6 @@ void View::_close() {
if (_doc) {
_document_uri_set_connection.disconnect();
_document_resized_connection.disconnect();
- sp_document_unref(_doc);
_doc = 0;
}
@@ -139,10 +138,9 @@ void View::setDocument(SPDocument *doc) {
if (_doc) {
_document_uri_set_connection.disconnect();
_document_resized_connection.disconnect();
- sp_document_unref (_doc);
}
- _doc = sp_document_ref (doc);
+ _doc = doc;
_document_uri_set_connection =
_doc->connectURISet(sigc::bind(sigc::ptr_fun(&_onDocumentURISet), this));
_document_resized_connection =