diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-11-21 10:49:53 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-11-21 10:49:53 +0000 |
| commit | e47fb0e9289362d92a13454d9768dd747e2bb917 (patch) | |
| tree | 2b9f31379549a739684ac2c8246e7fc6f999792a /src | |
| parent | added knot improvements pointed by su_v (diff) | |
| parent | Windows: add 64bit GTK3 buildtool build file. (diff) | |
| download | inkscape-e47fb0e9289362d92a13454d9768dd747e2bb917.tar.gz inkscape-e47fb0e9289362d92a13454d9768dd747e2bb917.zip | |
update to trunk
(bzr r13682.1.20)
Diffstat (limited to 'src')
| -rw-r--r-- | src/live_effects/parameter/filletchamferpointarray.cpp | 2 | ||||
| -rw-r--r-- | src/sp-namedview.cpp | 5 | ||||
| -rw-r--r-- | src/sp-namedview.h | 2 | ||||
| -rw-r--r-- | src/svg/stringstream-test.h | 6 | ||||
| -rw-r--r-- | src/svg/svg-length-test.h | 6 | ||||
| -rw-r--r-- | src/ui/tools/freehand-base.cpp | 2 | ||||
| -rw-r--r-- | src/ui/widget/page-sizer.cpp | 4 | ||||
| -rw-r--r-- | src/util/units.cpp | 1 |
8 files changed, 13 insertions, 15 deletions
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<D2<SBasis> > 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]); 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/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"); } 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.}, 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, 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); } 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)); } |
