diff options
| author | Thomas Holder <thomas@thomas-holder.de> | 2019-07-27 14:40:29 +0000 |
|---|---|---|
| committer | Thomas Holder <thomas@thomas-holder.de> | 2019-07-27 14:40:29 +0000 |
| commit | 63203fb881bfce667a14b2bbb3ec2ee40a9adf77 (patch) | |
| tree | 86f322f2330dd9bd2f6719ffd7fd828bc67e4356 /src/object/sp-guide.cpp | |
| parent | Crashfix for connectors avoid selected items (diff) | |
| download | inkscape-63203fb881bfce667a14b2bbb3ec2ee40a9adf77.tar.gz inkscape-63203fb881bfce667a14b2bbb3ec2ee40a9adf77.zip | |
Make doc2dt a document property
Closes #340
Diffstat (limited to 'src/object/sp-guide.cpp')
| -rw-r--r-- | src/object/sp-guide.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/object/sp-guide.cpp b/src/object/sp-guide.cpp index 853511d42..6230e10eb 100644 --- a/src/object/sp-guide.cpp +++ b/src/object/sp-guide.cpp @@ -130,7 +130,7 @@ void SPGuide::set(SPAttributeEnum key, const gchar *value) { Geom::Point direction(newx, newy); // <sodipodi:guide> stores inverted y-axis coordinates - if (!SP_ACTIVE_DESKTOP || SP_ACTIVE_DESKTOP->is_yaxisdown()) { + if (document->is_yaxisdown()) { direction[Geom::Y] *= -1.0; } @@ -181,7 +181,7 @@ void SPGuide::set(SPAttributeEnum key, const gchar *value) { } // <sodipodi:guide> stores inverted y-axis coordinates - if (!SP_ACTIVE_DESKTOP || SP_ACTIVE_DESKTOP->is_yaxisdown()) { + if (document->is_yaxisdown()) { this->point_on_line[Geom::Y] = document->getHeight().value("px") - this->point_on_line[Geom::Y]; } } else { @@ -215,7 +215,7 @@ SPGuide *SPGuide::createSPGuide(SPDocument *doc, Geom::Point const &pt1, Geom::P SPRoot *root = doc->getRoot(); // <sodipodi:guide> stores inverted y-axis coordinates - if (!SP_ACTIVE_DESKTOP || SP_ACTIVE_DESKTOP->is_yaxisdown()) { + if (doc->is_yaxisdown()) { newy = doc->getHeight().value("px") - newy; n[Geom::Y] *= -1.0; } @@ -388,7 +388,7 @@ void SPGuide::moveto(Geom::Point const point_on_line, bool const commit) double newy = point_on_line.y(); // <sodipodi:guide> stores inverted y-axis coordinates - if (!SP_ACTIVE_DESKTOP || SP_ACTIVE_DESKTOP->is_yaxisdown()) { + if (document->is_yaxisdown()) { newy = document->getHeight().value("px") - newy; } @@ -441,7 +441,7 @@ void SPGuide::set_normal(Geom::Point const normal_to_line, bool const commit) auto normal = normal_to_line; // <sodipodi:guide> stores inverted y-axis coordinates - if (!SP_ACTIVE_DESKTOP || SP_ACTIVE_DESKTOP->is_yaxisdown()) { + if (document->is_yaxisdown()) { normal[Geom::Y] *= -1.0; } |
