From f72425e86c5cacb4274d347661c7632e7cca80e5 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Sun, 13 Oct 2013 21:00:16 +0200 Subject: UI message generalisation (bzr r12683) --- src/live_effects/lpe-rough-hatches.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp index 0579b1016..6ffb913bd 100644 --- a/src/live_effects/lpe-rough-hatches.cpp +++ b/src/live_effects/lpe-rough-hatches.cpp @@ -239,10 +239,10 @@ LPERoughHatches::LPERoughHatches(LivePathEffectObject *lpeobject) : fat_output(_("Generate thick/thin path"), _("Simulate a stroke of varying width"), "fat_output", &wr, this, true), do_bend(_("Bend hatches"), _("Add a global bend to the hatches (slower)"), "do_bend", &wr, this, true), stroke_width_top(_("Thickness: at 1st side:"), _("Width at 'bottom' half-turns"), "stroke_width_top", &wr, this, 1.), - stroke_width_bot(_("at 2nd side:"), _("Width at 'top' half-turns"), "stroke_width_bottom", &wr, this, 1.), + stroke_width_bot(_("At 2nd side:"), _("Width at 'top' half-turns"), "stroke_width_bottom", &wr, this, 1.), // - front_thickness(_("from 2nd to 1st side:"), _("Width from 'top' to 'bottom'"), "front_thickness", &wr, this, 1.), - back_thickness(_("from 1st to 2nd side:"), _("Width from 'bottom' to 'top'"), "back_thickness", &wr, this, .25), + front_thickness(_("From 2nd to 1st side:"), _("Width from 'top' to 'bottom'"), "front_thickness", &wr, this, 1.), + back_thickness(_("From 1st to 2nd side:"), _("Width from 'bottom' to 'top'"), "back_thickness", &wr, this, .25), direction(_("Hatches width and dir"), _("Defines hatches frequency and direction"), "direction", &wr, this, Geom::Point(50,0)), // -- cgit v1.2.3 From 6af55a0be21d302ef07185527e7e92ad220c6a58 Mon Sep 17 00:00:00 2001 From: Markus Engel Date: Sun, 13 Oct 2013 22:00:27 +0200 Subject: Changes to object creation. Fixes some warning in new from template. Fixed bugs: - https://launchpad.net/bugs/1239419 (bzr r12686) --- src/sp-object.cpp | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index 6fd4de43b..8c54caf48 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -596,14 +596,11 @@ void SPObject::child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) ochild->invoke_build(object->document, child, object->cloned); } catch (const FactoryExceptions::TypeNotRegistered& e) { - std::string node = e.what(); - - // special cases - if (node.empty()) return; // comments, usually - if (node == "rdf:RDF") return; // no SP node yet - if (node == "inkscape:clipboard") return; // SP node not necessary - - g_warning("TypeNotRegistered exception: %s", e.what()); + // Currenty, there are many node types that do not have + // corresponding classes in the SPObject tree. + // (rdf:RDF, inkscape:clipboard, ...) + // Thus, simply ignore this case for now. + return; } } @@ -617,13 +614,13 @@ void SPObject::release() { } void SPObject::remove_child(Inkscape::XML::Node* child) { - SPObject* object = this; + debug("id=%x, typename=%s", this, g_type_name_from_instance((GTypeInstance*)this)); - debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object)); - SPObject *ochild = object->get_child_by_repr(child); - g_return_if_fail (ochild != NULL || !strcmp("comment", child->name())); // comments have no objects + SPObject *ochild = this->get_child_by_repr(child); + + // If the xml node has got a corresponding child in the object tree if (ochild) { - object->detach(ochild); + this->detach(ochild); } } @@ -662,7 +659,11 @@ void SPObject::build(SPDocument *document, Inkscape::XML::Node *repr) { sp_object_unref(child, NULL); child->invoke_build(document, rchild, object->cloned); } catch (const FactoryExceptions::TypeNotRegistered& e) { - g_warning("TypeNotRegistered exception: %s", e.what()); + // Currenty, there are many node types that do not have + // corresponding classes in the SPObject tree. + // (rdf:RDF, inkscape:clipboard, ...) + // Thus, simply ignore this case for now. + return; } } } -- cgit v1.2.3 From 917478418da526f439edce20efa935080e3c5e11 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 14 Oct 2013 15:17:05 +0200 Subject: Fix tangent calculation for counter-clockwise arcs. (bzr r12687) --- src/2geom/elliptical-arc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/2geom/elliptical-arc.cpp b/src/2geom/elliptical-arc.cpp index 29e983ad4..d2cb0b707 100644 --- a/src/2geom/elliptical-arc.cpp +++ b/src/2geom/elliptical-arc.cpp @@ -360,7 +360,7 @@ EllipticalArc::pointAndDerivatives(Coord t, unsigned int n) const for ( unsigned int i = 0; i < m; ++i ) { result.push_back( ea->pointAtAngle(angle) ); - angle += M_PI/2; + angle += (_sweep ? M_PI/2 : -M_PI/2); if ( !(angle < 2*M_PI) ) angle -= 2*M_PI; } m = nn / 4; -- cgit v1.2.3