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/arc-context.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/arc-context.cpp') diff --git a/src/arc-context.cpp b/src/arc-context.cpp index 827a0eb35..1f14bd270 100644 --- a/src/arc-context.cpp +++ b/src/arc-context.cpp @@ -67,7 +67,6 @@ const std::string SPArcContext::prefsPath = "/tools/shapes/arc"; SPArcContext::SPArcContext() : SPEventContext() { - this->_message_context = 0; this->cursor_shape = cursor_ellipse_xpm; this->hot_x = 4; this->hot_y = 4; @@ -101,8 +100,6 @@ SPArcContext::~SPArcContext() { if (this->arc) { this->finishItem(); } - - delete this->_message_context; } /** @@ -139,8 +136,6 @@ void SPArcContext::setup() { if (prefs->getBool("/tools/shapes/gradientdrag")) { this->enableGrDrag(); } - - this->_message_context = new Inkscape::MessageContext(this->desktop->messageStack()); } bool SPArcContext::item_handler(SPItem* item, GdkEvent* event) { @@ -357,7 +352,7 @@ bool SPArcContext::root_handler(GdkEvent* event) { void SPArcContext::drag(Geom::Point pt, guint state) { if (!this->arc) { - if (Inkscape::have_viable_layer(desktop, this->_message_context) == false) { + if (Inkscape::have_viable_layer(desktop, this->message_context) == false) { return; } @@ -435,9 +430,9 @@ void SPArcContext::drag(Geom::Point pt, guint state) { ratio_y = (int) rint (rdimy / rdimx); } - this->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Ellipse: %s × %s (constrained to ratio %d:%d); with Shift to draw around the starting point"), xs->str, ys->str, ratio_x, ratio_y); + this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Ellipse: %s × %s (constrained to ratio %d:%d); with Shift to draw around the starting point"), xs->str, ys->str, ratio_x, ratio_y); } else { - this->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Ellipse: %s × %s; with Ctrl to make square or integer-ratio ellipse; with Shift to draw around the starting point"), xs->str, ys->str); + this->message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("Ellipse: %s × %s; with Ctrl to make square or integer-ratio ellipse; with Shift to draw around the starting point"), xs->str, ys->str); } g_string_free(xs, FALSE); @@ -445,7 +440,7 @@ void SPArcContext::drag(Geom::Point pt, guint state) { } void SPArcContext::finishItem() { - this->_message_context->clear(); + this->message_context->clear(); if (this->arc != NULL) { if (this->arc->rx.computed == 0 || this->arc->ry.computed == 0) { -- cgit v1.2.3