diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-09-08 21:29:10 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2013-09-08 21:29:10 +0000 |
| commit | 36553c85069d88ba5e7b5fba7cd31cc4818a454d (patch) | |
| tree | f9832fe22e771c66215647a4857ee68fa3f9300b /src/util/units.cpp | |
| parent | update to trunk (diff) | |
| parent | Add a check so objects removed from the document dont crash inkscape, happens... (diff) | |
| download | inkscape-36553c85069d88ba5e7b5fba7cd31cc4818a454d.tar.gz inkscape-36553c85069d88ba5e7b5fba7cd31cc4818a454d.zip | |
update to trunk
(bzr r11950.1.138)
Diffstat (limited to 'src/util/units.cpp')
| -rw-r--r-- | src/util/units.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/units.cpp b/src/util/units.cpp index 7bc910fcc..3fdd77916 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -227,9 +227,10 @@ Quantity UnitTable::getQuantity(Glib::ustring const& q) const // Extract value double value = 0; - Glib::RefPtr<Glib::Regex> value_regex = Glib::Regex::create("[-+]*[\\d+]*\\.*[\\d+]*[eE]*[-+]*\\d+"); + Glib::RefPtr<Glib::Regex> value_regex = Glib::Regex::create("[-+]*[\\d+]*[\\.,]*[\\d+]*[eE]*[-+]*\\d+"); if (value_regex->match(q, match_info)) { - value = atof(match_info.fetch(0).c_str()); + std::istringstream tmp_v(match_info.fetch(0)); + tmp_v >> value; } // Extract unit abbreviation |
