summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-fillet-chamfer.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2018-09-30 23:49:43 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2018-09-30 23:49:43 +0000
commitdfe4295847a74b7bbded4bca6693b862c002e7e5 (patch)
tree7b7c37fa4d286eb837ccc04593f4c133943e2f23 /src/live_effects/lpe-fillet-chamfer.cpp
parentRevert "c++11 refactor: std::auto_ptr -> std::unique_ptr" (diff)
downloadinkscape-dfe4295847a74b7bbded4bca6693b862c002e7e5.tar.gz
inkscape-dfe4295847a74b7bbded4bca6693b862c002e7e5.zip
Improve calls to document_units
Diffstat (limited to 'src/live_effects/lpe-fillet-chamfer.cpp')
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index 1981c6983..8e07388f5 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -102,8 +102,7 @@ void LPEFilletChamfer::doOnApply(SPLPEItem const *lpeItem)
double power = radius;
if (!flexible) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
- SPNamedView *nv = sp_document_namedview(document, nullptr);
- Glib::ustring display_unit = nv->display_units->abbr;
+ Glib::ustring display_unit = document->getDisplayUnit()->abbr.c_str();
power = Inkscape::Util::Quantity::convert(power, unit.get_abbreviation(), display_unit.c_str());
}
SatelliteType satellite_type = FILLET;
@@ -257,8 +256,7 @@ void LPEFilletChamfer::updateAmount()
double power = radius;
if (!flexible) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
- SPNamedView *nv = sp_document_namedview(document, nullptr);
- Glib::ustring display_unit = nv->display_units->abbr;
+ Glib::ustring display_unit = document->getDisplayUnit()->abbr.c_str();
power = Inkscape::Util::Quantity::convert(power, unit.get_abbreviation(), display_unit.c_str());
}
_pathvector_satellites->updateAmount(power, apply_no_radius, apply_with_radius, only_selected,
@@ -323,8 +321,7 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem)
double power = radius;
if (!flexible) {
SPDocument * document = SP_ACTIVE_DOCUMENT;
- SPNamedView *nv = sp_document_namedview(document, nullptr);
- Glib::ustring display_unit = nv->display_units->abbr;
+ Glib::ustring display_unit = document->getDisplayUnit()->abbr.c_str();
power = Inkscape::Util::Quantity::convert(power, unit.get_abbreviation(), display_unit.c_str());
}
SatelliteType satellite_type = FILLET;