summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/grid-arrange-tab.cpp2
-rw-r--r--src/ui/dialog/polar-arrange-tab.cpp4
-rw-r--r--src/ui/tools/spray-tool.cpp3
-rw-r--r--src/ui/tools/text-tool.cpp3
-rw-r--r--src/ui/widget/page-sizer.cpp2
5 files changed, 6 insertions, 8 deletions
diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp
index 8b43090c4..edfdf2838 100644
--- a/src/ui/dialog/grid-arrange-tab.cpp
+++ b/src/ui/dialog/grid-arrange-tab.cpp
@@ -326,7 +326,7 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h
Geom::Point move = Geom::Point(new_x, new_y) - min;
Geom::Affine const affine = Geom::Affine(Geom::Translate(move));
- item->set_i2d_affine(item->i2doc_affine() * affine * SP_ACTIVE_DESKTOP->doc2dt());
+ item->set_i2d_affine(item->i2doc_affine() * affine * item->document->doc2dt());
item->doWriteTransform(item->transform);
item->updateRepr();
cnt +=1;
diff --git a/src/ui/dialog/polar-arrange-tab.cpp b/src/ui/dialog/polar-arrange-tab.cpp
index 98f3bf2aa..5a2b1a145 100644
--- a/src/ui/dialog/polar-arrange-tab.cpp
+++ b/src/ui/dialog/polar-arrange-tab.cpp
@@ -240,9 +240,9 @@ static Geom::Point getAnchorPoint(int anchor, SPItem *item)
// If using center
if(anchor == 9)
source = item->getCenter();
- else if (SP_ACTIVE_DESKTOP)
+ else
{
- source *= SP_ACTIVE_DESKTOP->doc2dt();
+ source *= item->document->doc2dt();
}
return source;
diff --git a/src/ui/tools/spray-tool.cpp b/src/ui/tools/spray-tool.cpp
index f29a68691..c910607a9 100644
--- a/src/ui/tools/spray-tool.cpp
+++ b/src/ui/tools/spray-tool.cpp
@@ -426,8 +426,7 @@ static void sp_spray_transform_path(SPItem * item, Geom::Path &path, Geom::Affin
if (item->parent) {
dt2p = static_cast<SPItem *>(item->parent)->i2dt_affine().inverse();
} else {
- SPDesktop *dt = SP_ACTIVE_DESKTOP;
- dt2p = dt->dt2doc();
+ dt2p = item->document->dt2doc();
}
Geom::Affine i2dt = item->i2dt_affine() * Geom::Translate(center).inverse() * affine * Geom::Translate(center);
path *= i2dt * dt2p;
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index 18fefa508..b8d66817b 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -1669,8 +1669,7 @@ static void sp_text_context_update_cursor(TextTool *tc, bool scroll_to_see)
if (opt_frame) {
// User units to screen pixels
Geom::Rect frame = *opt_frame;
- frame *= SP_TEXT(tc->text)->i2doc_affine();
- frame *= SP_ACTIVE_DESKTOP->dt2doc().inverse();
+ frame *= tc->text->i2dt_affine();
SP_CTRLRECT(tc->frame)->setRectangle(frame);
sp_canvas_item_show(tc->frame);
diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp
index bd7409a0c..d869a1c5e 100644
--- a/src/ui/widget/page-sizer.cpp
+++ b/src/ui/widget/page-sizer.cpp
@@ -344,7 +344,7 @@ PageSizer::setDim (Inkscape::Util::Quantity w, Inkscape::Util::Quantity h, bool
doc->setWidthAndHeight (w, h, changeSize);
// The origin for the user is in the lower left corner; this point should remain stationary when
// changing the page size. The SVG's origin however is in the upper left corner, so we must compensate for this
- if (changeSize && !SP_ACTIVE_DESKTOP->is_yaxisdown()) {
+ if (changeSize && !doc->is_yaxisdown()) {
Geom::Translate const vert_offset(Geom::Point(0, (old_height.value("px") - h.value("px"))));
doc->getRoot()->translateChildItems(vert_offset);
}