summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/measure-tool.cpp
diff options
context:
space:
mode:
authorNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-04-26 04:10:54 +0000
committerNathan Lee <2431820-nathanal@users.noreply.gitlab.com>2019-04-30 12:01:19 +0000
commit9db06f0ff1f297754e328eb5909e98792091b6ec (patch)
tree5e66aba0e03b3c6677f0220f30ff7a1f9cf217f9 /src/ui/tools/measure-tool.cpp
parentSimplify UI for LPE add (diff)
downloadinkscape-9db06f0ff1f297754e328eb5909e98792091b6ec.tar.gz
inkscape-9db06f0ff1f297754e328eb5909e98792091b6ec.zip
Make display unit change roll out to toolbars
Add exception for measure tool, which uses preferences Fixes https://gitlab.com/inkscape/inbox/issues/393 Partial fix: https://gitlab.com/inkscape/inkscape/issues/208
Diffstat (limited to 'src/ui/tools/measure-tool.cpp')
-rw-r--r--src/ui/tools/measure-tool.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/tools/measure-tool.cpp b/src/ui/tools/measure-tool.cpp
index f8c8517c9..64824514e 100644
--- a/src/ui/tools/measure-tool.cpp
+++ b/src/ui/tools/measure-tool.cpp
@@ -810,7 +810,7 @@ void MeasureTool::toMarkDimension()
setLine(start, end, true, color);
Glib::ustring unit_name = prefs->getString("/tools/measure/unit");
if (!unit_name.compare("")) {
- unit_name = "px";
+ unit_name = DEFAULT_UNIT_NAME;
}
double fontsize = prefs->getDouble("/tools/measure/fontsize", 10.0);
int precision = prefs->getInt("/tools/measure/precision", 2);
@@ -1162,7 +1162,7 @@ void MeasureTool::showInfoBox(Geom::Point cursor, bool into_groups)
Glib::ustring unit_name = prefs->getString("/tools/measure/unit");
bool only_selected = prefs->getBool("/tools/measure/only_selected", false);
if (!unit_name.compare("")) {
- unit_name = "px";
+ unit_name = DEFAULT_UNIT_NAME;
}
Geom::Scale zoom = Geom::Scale(Inkscape::Util::Quantity::convert(desktop->current_zoom(), "px", unit->abbr)).inverse();
if(newover != over){
@@ -1324,7 +1324,7 @@ void MeasureTool::showCanvasItems(bool to_guides, bool to_item, bool to_phantom,
}
Glib::ustring unit_name = prefs->getString("/tools/measure/unit");
if (!unit_name.compare("")) {
- unit_name = "px";
+ unit_name = DEFAULT_UNIT_NAME;
}
double scale = prefs->getDouble("/tools/measure/scale", 100.0) / 100.0;
double fontsize = prefs->getDouble("/tools/measure/fontsize", 10.0);