From 1227ca0189590b281116fcc808bdd8c674b2196c Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sat, 20 Apr 2013 21:16:13 +0200 Subject: Further changes to EventContexts; they work without GObject (bzr r11608.1.97) --- src/rect-context.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/rect-context.cpp') diff --git a/src/rect-context.cpp b/src/rect-context.cpp index e0c0af2c9..2a1dfcd55 100644 --- a/src/rect-context.cpp +++ b/src/rect-context.cpp @@ -155,6 +155,31 @@ void CRectContext::finish() { CEventContext::finish(); } + +SPRectContext::~SPRectContext() { + SPRectContext *rc = SP_RECT_CONTEXT(this); + SPEventContext *ec = SP_EVENT_CONTEXT(this); + + ec->enableGrDrag(false); + + rc->sel_changed_connection.disconnect(); + rc->sel_changed_connection.~connection(); + + delete ec->shape_editor; + ec->shape_editor = NULL; + + /* fixme: This is necessary because we do not grab */ + if (rc->item) { + sp_rect_finish(rc); + } + + if (rc->_message_context) { + delete rc->_message_context; + } + + //G_OBJECT_CLASS(sp_rect_context_parent_class)->dispose(object); +} + static void sp_rect_context_dispose(GObject *object) { SPRectContext *rc = SP_RECT_CONTEXT(object); -- cgit v1.2.3