summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-ruler.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-09-30 14:05:42 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-09-30 14:05:42 +0000
commit8c0ce697003c01ce10807adb3a08b5353c19a447 (patch)
tree831c4f953706f1930d6094c50c564e52a2a39d30 /src/live_effects/lpe-ruler.cpp
parentFix issue 872. LPE on rects is not rendering in browsers (diff)
downloadinkscape-8c0ce697003c01ce10807adb3a08b5353c19a447.tar.gz
inkscape-8c0ce697003c01ce10807adb3a08b5353c19a447.zip
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.
Diffstat (limited to 'src/live_effects/lpe-ruler.cpp')
-rw-r--r--src/live_effects/lpe-ruler.cpp4
1 files changed, 2 insertions, 2 deletions
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<Geom::D2<Geom::SBasis> > const & pwd2_i
std::vector<double> 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());
}