summaryrefslogtreecommitdiffstats
path: root/src/box3d.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2015-11-15 08:31:53 +0000
committer~suv <suv-sf@users.sourceforge.net>2015-11-15 08:31:53 +0000
commitac8b388ada4e781b29570276ed9f95fd6f4dafff (patch)
tree268308a8a304debb7cf2f84e1255d5633dee5eef /src/box3d.cpp
parentExtensions. Fix view center for Render extensions applied in transformed laye... (diff)
parentTranslations. Italian translation update. (diff)
downloadinkscape-ac8b388ada4e781b29570276ed9f95fd6f4dafff.tar.gz
inkscape-ac8b388ada4e781b29570276ed9f95fd6f4dafff.zip
merge from trunk (r14473)
(bzr r14425.1.3)
Diffstat (limited to 'src/box3d.cpp')
-rw-r--r--src/box3d.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/box3d.cpp b/src/box3d.cpp
index dc04a2eb6..c4c2728e4 100644
--- a/src/box3d.cpp
+++ b/src/box3d.cpp
@@ -50,6 +50,11 @@ SPBox3D::SPBox3D() : SPGroup() {
this->persp_href = NULL;
this->persp_ref = new Persp3DReference(this);
+
+ /* we initialize the z-orders to zero so that they are updated during dragging */
+ for (int i = 0; i < 6; ++i) {
+ z_orders[i] = 0;
+ }
}
SPBox3D::~SPBox3D() {
@@ -902,7 +907,7 @@ box3d_swap_sides(int z_orders[6], Box3D::Axis axis) {
}
}
- if (pos1 != -1){
+ if ((pos1 != -1) && (pos2 != -1)){
int tmp = z_orders[pos1];
z_orders[pos1] = z_orders[pos2];
z_orders[pos2] = tmp;