diff options
| author | Matthew Petroff <matthew@mpetroff.net> | 2014-08-17 00:23:01 +0000 |
|---|---|---|
| committer | Matthew Petroff <matthew@mpetroff.net> | 2014-08-17 00:23:01 +0000 |
| commit | 38b8b56f7a45878b6aea857f8bcc15064f44200d (patch) | |
| tree | 1f582c5ae933759e7a622e263aa5edcd56f406a1 | |
| parent | Fix shift of transformation center on pasting (diff) | |
| download | inkscape-38b8b56f7a45878b6aea857f8bcc15064f44200d.tar.gz inkscape-38b8b56f7a45878b6aea857f8bcc15064f44200d.zip | |
Fix grid jumping (bug #1342238).
Fixed bugs:
- https://launchpad.net/bugs/1342238
(bzr r13522)
| -rw-r--r-- | src/display/canvas-axonomgrid.cpp | 3 | ||||
| -rw-r--r-- | src/util/units.cpp | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp index 312a8d655..592c962a6 100644 --- a/src/display/canvas-axonomgrid.cpp +++ b/src/display/canvas-axonomgrid.cpp @@ -387,6 +387,9 @@ _wr.setUpdating (false); _rcp_gmcol->setRgba32 (empcolor); _rsi->setValue (empspacing); + _rsu_ox->setProgrammatically = false; + _rsu_oy->setProgrammatically = false; + return table; } diff --git a/src/util/units.cpp b/src/util/units.cpp index d2053f60b..eb4a313e0 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -291,11 +291,15 @@ Quantity UnitTable::parseQuantity(Glib::ustring const &q) const std::istringstream tmp_v(match_info.fetch(0)); tmp_v >> value; } + int start_pos, end_pos; + match_info.fetch_pos(0, end_pos, start_pos); + end_pos = q.size() - start_pos; + Glib::ustring u = q.substr(start_pos, end_pos); // Extract unit abbreviation Glib::ustring abbr; Glib::RefPtr<Glib::Regex> unit_regex = Glib::Regex::create("[A-z%]+"); - if (unit_regex->match(q, match_info)) { + if (unit_regex->match(u, match_info)) { abbr = match_info.fetch(0); } |
