summaryrefslogtreecommitdiffstats
path: root/src/widgets/stroke-style.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-11-24 19:56:53 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-11-24 19:56:53 +0000
commitbad0504958a10f1b99db3ae2557305541f388a52 (patch)
tree2fdec1e71db3d37d097e07cdd5b210eaaa844bcf /src/widgets/stroke-style.cpp
parentExtensions: try to calculate the SVG unit (diff)
downloadinkscape-bad0504958a10f1b99db3ae2557305541f388a52.tar.gz
inkscape-bad0504958a10f1b99db3ae2557305541f388a52.zip
Units: make it absolutely clear that Document properties unit dropdown is for UI Display Units. Upon document load, calculate the units used for SVG values, if a viewbox is available. If not, default to "px" SVG units.
Change all code to use either Display units OR svg units. (bzr r13751)
Diffstat (limited to 'src/widgets/stroke-style.cpp')
-rw-r--r--src/widgets/stroke-style.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp
index 02dd5df6e..7c85689a2 100644
--- a/src/widgets/stroke-style.cpp
+++ b/src/widgets/stroke-style.cpp
@@ -204,8 +204,8 @@ StrokeStyle::StrokeStyle() :
unitSelector->addUnit(*unit_table.getUnit("%"));
_old_unit = unitSelector->getUnit();
if (desktop) {
- unitSelector->setUnit(sp_desktop_namedview(desktop)->doc_units->abbr);
- _old_unit = sp_desktop_namedview(desktop)->doc_units;
+ unitSelector->setUnit(sp_desktop_namedview(desktop)->svg_units->abbr);
+ _old_unit = sp_desktop_namedview(desktop)->svg_units;
}
widthSpin->setUnitMenu(unitSelector);
unitChangedConn = unitSelector->signal_changed().connect(sigc::mem_fun(*this, &StrokeStyle::unitChangedCB));
@@ -839,7 +839,7 @@ StrokeStyle::updateLine()
// same width, or only one object; no sense to keep percent, switch to absolute
Inkscape::Util::Unit const *tempunit = unitSelector->getUnit();
if (tempunit->type != Inkscape::Util::UNIT_TYPE_LINEAR) {
- unitSelector->setUnit(sp_desktop_namedview(SP_ACTIVE_DESKTOP)->doc_units->abbr);
+ unitSelector->setUnit(sp_desktop_namedview(SP_ACTIVE_DESKTOP)->display_units->abbr);
}
}