summaryrefslogtreecommitdiffstats
path: root/src/perspective3d.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-08-07 07:37:23 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-08-07 07:37:23 +0000
commitbf4199cce148e93c509371ae18c55a68a9e2b106 (patch)
tree1ef730e95c0650b6d8e4db0f9067d8a5f559dcf4 /src/perspective3d.cpp
parentSet z-orders of 3D box faces during dragging/resizing according to the perspe... (diff)
downloadinkscape-bf4199cce148e93c509371ae18c55a68a9e2b106.tar.gz
inkscape-bf4199cce148e93c509371ae18c55a68a9e2b106.zip
Don't reshape boxes in the direction of infinite VPs when dragging VPs (fixes resizing bug)
(bzr r3410)
Diffstat (limited to 'src/perspective3d.cpp')
-rw-r--r--src/perspective3d.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/perspective3d.cpp b/src/perspective3d.cpp
index bb4963d11..421725bdb 100644
--- a/src/perspective3d.cpp
+++ b/src/perspective3d.cpp
@@ -296,18 +296,24 @@ Perspective3D::reshape_boxes (Box3D::Axis axes)
SP3DBox *box = SP_3DBOX (i->data);
if (axes & Box3D::X) {
vp = this->get_vanishing_point (Box3D::X);
- new_pt = vp->get_pos() + box->ratio_x * (box->corners[3] - vp->get_pos());
- sp_3dbox_move_corner_in_XY_plane (box, 2, new_pt);
+ if (vp->is_finite()) {
+ new_pt = vp->get_pos() + box->ratio_x * (box->corners[3] - vp->get_pos());
+ sp_3dbox_move_corner_in_XY_plane (box, 2, new_pt);
+ }
}
if (axes & Box3D::Y) {
vp = this->get_vanishing_point (Box3D::Y);
- new_pt = vp->get_pos() + box->ratio_y * (box->corners[0] - vp->get_pos());
- sp_3dbox_move_corner_in_XY_plane (box, 2, new_pt);
+ if (vp->is_finite()) {
+ new_pt = vp->get_pos() + box->ratio_y * (box->corners[0] - vp->get_pos());
+ sp_3dbox_move_corner_in_XY_plane (box, 2, new_pt);
+ }
}
if (axes & Box3D::Z) {
vp = this->get_vanishing_point (Box3D::Z);
- new_pt = vp->get_pos() + box->ratio_z * (box->corners[0] - vp->get_pos());
- sp_3dbox_move_corner_in_Z_direction (box, 4, new_pt);
+ if (vp->is_finite()) {
+ new_pt = vp->get_pos() + box->ratio_z * (box->corners[0] - vp->get_pos());
+ sp_3dbox_move_corner_in_Z_direction (box, 4, new_pt);
+ }
}
sp_3dbox_set_shape (box, true);