From 989abbac025a8b3349748d19a613a08586c5fdcd Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Wed, 31 Jul 2013 21:11:20 +0200 Subject: Fixed SPObject ctor and dtor; removed singleton.h; some smaller changes. (bzr r11608.1.110) --- src/box3d-context.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/box3d-context.cpp') diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index f0bb67dcc..1e0a62a1b 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -70,8 +70,6 @@ const std::string& Box3DContext::getPrefsPath() { const std::string Box3DContext::prefsPath = "/tools/shapes/3dbox"; Box3DContext::Box3DContext() : SPEventContext() { - this->_message_context = 0; - this->cursor_shape = cursor_3dbox_xpm; this->hot_x = 4; this->hot_y = 4; @@ -113,10 +111,6 @@ Box3DContext::~Box3DContext() { if (this->box3d) { this->finishItem(); } - - if (this->_message_context) { - delete this->_message_context; - } } /** @@ -178,8 +172,6 @@ void Box3DContext::setup() { if (prefs->getBool("/tools/shapes/gradientdrag")) { this->enableGrDrag(); } - - this->_message_context = new Inkscape::MessageContext(this->desktop->messageStack()); } bool Box3DContext::item_handler(SPItem* item, GdkEvent* event) { @@ -522,7 +514,7 @@ bool Box3DContext::root_handler(GdkEvent* event) { void Box3DContext::drag(guint state) { if (!this->box3d) { - if (Inkscape::have_viable_layer(desktop, this->_message_context) == false) { + if (Inkscape::have_viable_layer(desktop, this->message_context) == false) { return; } @@ -594,11 +586,11 @@ void Box3DContext::drag(guint state) { box3d_position_set(this->box3d); // status text - this->_message_context->setF(Inkscape::NORMAL_MESSAGE, _("3D Box; with Shift to extrude along the Z axis")); + this->message_context->setF(Inkscape::NORMAL_MESSAGE, _("3D Box; with Shift to extrude along the Z axis")); } void Box3DContext::finishItem() { - this->_message_context->clear(); + this->message_context->clear(); this->ctrl_dragged = false; this->extruded = false; -- cgit v1.2.3