summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-09-23 16:08:52 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-09-23 16:08:52 +0000
commit78c3478e08ea6c33fbf265d8f22b02fa99660d8a (patch)
treea14d571ad2dbfdf5a3f08d03c0d215e0785d1cb8 /src/ui
parentInkscapestream: Incredible speed up for writing of strings (diff)
downloadinkscape-78c3478e08ea6c33fbf265d8f22b02fa99660d8a.tar.gz
inkscape-78c3478e08ea6c33fbf265d8f22b02fa99660d8a.zip
fix "Arrange" dialog with inverted y-axis
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/dialog/grid-arrange-tab.cpp5
-rw-r--r--src/ui/dialog/polar-arrange-tab.cpp10
2 files changed, 5 insertions, 10 deletions
diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp
index 91e93de93..4b3dce298 100644
--- a/src/ui/dialog/grid-arrange-tab.cpp
+++ b/src/ui/dialog/grid-arrange-tab.cpp
@@ -324,10 +324,9 @@ g_print("\n row = %f col = %f selection x= %f selection y = %f", total_row_h
new_x = grid_left + (((col_widths[col] - width)/2)*HorizAlign) + col_xs[col];
new_y = grid_top + (((row_heights[row] - height)/2)*VertAlign) + row_ys[row];
- // signs are inverted between x and y due to y inversion
- Geom::Point move = Geom::Point(new_x - min[Geom::X], min[Geom::Y] - new_y);
+ Geom::Point move = Geom::Point(new_x, new_y) - min;
Geom::Affine const affine = Geom::Affine(Geom::Translate(move));
- item->set_i2d_affine(item->i2dt_affine() * affine);
+ item->set_i2d_affine(item->i2doc_affine() * affine * SP_ACTIVE_DESKTOP->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 49b5a5790..a44218f07 100644
--- a/src/ui/dialog/polar-arrange-tab.cpp
+++ b/src/ui/dialog/polar-arrange-tab.cpp
@@ -184,11 +184,9 @@ static Geom::Point calcPoint(float cx, float cy, float rx, float ry, float angle
}
/**
- * Returns the selected anchor point in document coordinates. If anchor
+ * Returns the selected anchor point in desktop coordinates. If anchor
* is 0 to 8, then a bounding box point has been chosen. If it is 9 however
* the rotational center is chosen.
- * @todo still using a hack to get the real coordinate space (subtracting document height
- * and inverting axes)
*/
static Geom::Point getAnchorPoint(int anchor, SPItem *item)
{
@@ -237,11 +235,9 @@ static Geom::Point getAnchorPoint(int anchor, SPItem *item)
// If using center
if(anchor == 9)
source = item->getCenter();
- else
+ else if (SP_ACTIVE_DESKTOP)
{
- // FIXME:
- source[1] -= item->document->getHeight().value("px");
- source[1] *= -1;
+ source *= SP_ACTIVE_DESKTOP->doc2dt();
}
return source;