From 8c0ce697003c01ce10807adb3a08b5353c19a447 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Mon, 30 Sep 2019 14:05:42 +0000 Subject: Apply a Nathan Lee fix to all LPE changing from SP_ACTIVE_DOCUMET to LPE->document. It also remove a boring check and allow to preview on file explorer some Items blocked. --- src/live_effects/lpe-ruler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/live_effects/lpe-ruler.cpp') diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp index 75052ad33..600508372 100644 --- a/src/live_effects/lpe-ruler.cpp +++ b/src/live_effects/lpe-ruler.cpp @@ -77,7 +77,7 @@ LPERuler::ruler_mark(Geom::Point const &A, Geom::Point const &n, MarkType const using namespace Geom; double real_mark_length = mark_length; - SPDocument * document = SP_ACTIVE_DOCUMENT; + SPDocument *document = getSPDoc(); if (document) { real_mark_length = Inkscape::Util::Quantity::convert(real_mark_length, unit.get_abbreviation(), document->getDisplayUnit()->abbr.c_str()); } @@ -133,7 +133,7 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise > const & pwd2_i std::vector s_cuts; double real_mark_distance = mark_distance; - SPDocument * document = SP_ACTIVE_DOCUMENT; + SPDocument *document = getSPDoc(); if (document) { real_mark_distance = Inkscape::Util::Quantity::convert(real_mark_distance, unit.get_abbreviation(), document->getDisplayUnit()->abbr.c_str()); } -- cgit v1.2.3