From 7be365f943fa4204784b0358b21a338b22230d04 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 19 Nov 2014 19:36:52 +0100 Subject: remove extra commnets (bzr r13732) --- src/live_effects/parameter/filletchamferpointarray.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/live_effects/parameter/filletchamferpointarray.cpp b/src/live_effects/parameter/filletchamferpointarray.cpp index b23145db1..7d8c8e9b0 100644 --- a/src/live_effects/parameter/filletchamferpointarray.cpp +++ b/src/live_effects/parameter/filletchamferpointarray.cpp @@ -708,9 +708,7 @@ void FilletChamferPointArrayParamKnotHolderEntity::knot_set(Point const &p, if (!valid_index(_index)) { return; } - /// @todo how about item transforms??? Piecewise > const &pwd2 = _pparam->get_pwd2(); - //todo: add snapping double t = nearest_point(p, pwd2[_index]); Geom::Point const s = snap_knot_position(pwd2[_index].valueAt(t), state); t = nearest_point(s, pwd2[_index]); -- cgit v1.2.3 From 39eb601008ddcd01b4e05ec2d6efb49a7732d5e3 Mon Sep 17 00:00:00 2001 From: Alvin Penner Date: Wed, 19 Nov 2014 14:31:03 -0500 Subject: modify sequence of events. (Bug 1247801) Fixed bugs: - https://launchpad.net/bugs/1247801 (bzr r13735) --- src/ui/tools/freehand-base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/ui/tools/freehand-base.cpp b/src/ui/tools/freehand-base.cpp index 6434c30d2..bd84e0efb 100644 --- a/src/ui/tools/freehand-base.cpp +++ b/src/ui/tools/freehand-base.cpp @@ -703,8 +703,8 @@ static void spdc_flush_white(FreehandBase *dc, SPCurve *gc) dc->selection->set(repr); Inkscape::GC::release(repr); item->transform = SP_ITEM(desktop->currentLayer())->i2doc_affine().inverse(); - item->doWriteTransform(item->getRepr(), item->transform, NULL, true); item->updateRepr(); + item->doWriteTransform(item->getRepr(), item->transform, NULL, true); } DocumentUndo::done(doc, SP_IS_PEN_CONTEXT(dc)? SP_VERB_CONTEXT_PEN : SP_VERB_CONTEXT_PENCIL, -- cgit v1.2.3 From f97613b94d629821f2d62fb19dce0f20cef2fc0a Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Wed, 19 Nov 2014 20:58:43 +0100 Subject: Tests: fix stringstream-test for outputting floating point numbers. At http://www.cplusplus.com/reference/ios/scientific/ I read that there are always three exponential digits (instead of the two that the test was testing for). If this is not standard, we should rewrite the tests. (bzr r13736) --- src/svg/stringstream-test.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/svg/stringstream-test.h b/src/svg/stringstream-test.h index ce32683f8..305cf6b8d 100644 --- a/src/svg/stringstream-test.h +++ b/src/svg/stringstream-test.h @@ -37,9 +37,9 @@ public: svg_test_float(-0.0625, "-0.0625"); svg_test_float(30.0, "30"); svg_test_float(12345678.0, "12345678"); - svg_test_float(3e9, "3e+09"); - svg_test_float(-3.5e9, "-3.5e+09"); - svg_test_float(32768e9, "3.2768e+13"); + svg_test_float(3e9, "3e+009"); + svg_test_float(-3.5e9, "-3.5e+009"); + svg_test_float(32768e9, "3.2768e+013"); svg_test_float(-10.5, "-10.5"); } -- cgit v1.2.3 From cb0223da226fadcedaaae8cadce0c52bb1eeca56 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Wed, 19 Nov 2014 21:34:11 +0100 Subject: units: remove a remnant from old code. There should be only one UnitTable instantiated. (bzr r13737) --- src/util/units.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src') diff --git a/src/util/units.cpp b/src/util/units.cpp index eb4a313e0..3d635e2d2 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -206,7 +206,6 @@ bool Unit::compatibleWith(Unit const *u) const } bool Unit::compatibleWith(Glib::ustring const &u) const { - static UnitTable unit_table; return compatibleWith(unit_table.getUnit(u)); } -- cgit v1.2.3 From 5dbdc6f8ca6d4181cc5e7b74beaaf0e4a0bcbed0 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Wed, 19 Nov 2014 22:20:49 +0100 Subject: Fix length tests. svg_length_read is casting the result to float ! (bzr r13739) --- src/svg/svg-length-test.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/svg/svg-length-test.h b/src/svg/svg-length-test.h index fbdb7588d..796943e45 100644 --- a/src/svg/svg-length-test.h +++ b/src/svg/svg-length-test.h @@ -168,9 +168,9 @@ SvgLengthTest::test_t const SvgLengthTest::absolute_tests[12] = { {"1e2pt", SVGLength::PT , 100 , 400.0/3.0}, {"3pc", SVGLength::PC , 3 , 48}, {"-3.5pc", SVGLength::PC , -3.5 , -3.5*16.0}, - {"1.2345678mm", SVGLength::MM , 1.2345678, 1.2345678*96.0/25.4}, // TODO: More precise constants? (a 7 digit constant when the default precision is 8 digits?) - {"123.45678cm", SVGLength::CM , 123.45678 , 123.45678*96.0/2.54}, - {"73.162987in", SVGLength::INCH, 73.162987 , 73.162987*96}}; + {"1.2345678mm", SVGLength::MM , 1.2345678, 1.2345678f*96.0/25.4}, // TODO: More precise constants? (a 7 digit constant when the default precision is 8 digits?) + {"123.45678cm", SVGLength::CM , 123.45678 , 123.45678f*96.0/2.54}, // Note that svg_length_read is casting the result from g_ascii_strtod to float. + {"73.162987in", SVGLength::INCH, 73.162987 , 73.162987f*96.0/1.00}}; SvgLengthTest::test_t const SvgLengthTest::relative_tests[3] = { {"123em", SVGLength::EM, 123, 123. * 7.}, {"123ex", SVGLength::EX, 123, 123. * 13.}, -- cgit v1.2.3 From f0f92e6aad8d897fa206474754a7bd09220c993d Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 20 Nov 2014 10:22:42 +0100 Subject: Rename variable to better express its use. (units -> page_size_units) (bzr r13740) --- src/sp-namedview.cpp | 5 +++-- src/sp-namedview.h | 2 +- src/ui/widget/page-sizer.cpp | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 8b28347f1..b68421dc6 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -72,7 +72,7 @@ SPNamedView::SPNamedView() : SPObjectGroup(), snap_manager(this) { this->guidehicolor = 0; this->views = NULL; this->borderlayer = 0; - this->units = NULL; + this->page_size_units = NULL; this->window_x = 0; this->cy = 0; this->window_y = 0; @@ -581,6 +581,7 @@ void SPNamedView::set(unsigned int key, const gchar* value) { break; } case SP_ATTR_UNITS: { + // Only used in "Custom size" section of Document Properties dialog Inkscape::Util::Unit const *new_unit = NULL; if (value) { @@ -599,7 +600,7 @@ void SPNamedView::set(unsigned int key, const gchar* value) { /* fixme: Don't use g_log (see above). */ } } - this->units = new_unit; + this->page_size_units = new_unit; this->requestModified(SP_OBJECT_MODIFIED_FLAG); break; } diff --git a/src/sp-namedview.h b/src/sp-namedview.h index 37310dc76..4746b2962 100644 --- a/src/sp-namedview.h +++ b/src/sp-namedview.h @@ -62,7 +62,7 @@ public: bool grids_visible; Inkscape::Util::Unit const *doc_units; - Inkscape::Util::Unit const *units; + Inkscape::Util::Unit const *page_size_units; // Only used in "Custom size" part of Document Properties dialog GQuark default_layer_id; diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 89b0b8f7e..32e357c57 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -311,8 +311,8 @@ PageSizer::PageSizer(Registry & _wr) SPDesktop *dt = SP_ACTIVE_DESKTOP; SPNamedView *nv = sp_desktop_namedview(dt); _wr.setUpdating (true); - if (nv->units) { - _dimensionUnits.setUnit(nv->units->abbr); + if (nv->page_size_units) { + _dimensionUnits.setUnit(nv->page_size_units->abbr); } else if (nv->doc_units) { _dimensionUnits.setUnit(nv->doc_units->abbr); } -- cgit v1.2.3