summaryrefslogtreecommitdiffstats
path: root/src/box3d-context.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-08-20 12:20:43 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-08-20 12:20:43 +0000
commitd280ef110024027424418a8873854e9362567c79 (patch)
tree42f7375c966523f2f00cc89bd82c96f6a56f6a89 /src/box3d-context.cpp
parentFilter effects dialog: (diff)
downloadinkscape-d280ef110024027424418a8873854e9362567c79.tar.gz
inkscape-d280ef110024027424418a8873854e9362567c79.zip
Avoid 'flashing' between front and rear face during initial dragging process of 3D boxes
(bzr r3552)
Diffstat (limited to 'src/box3d-context.cpp')
-rw-r--r--src/box3d-context.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index 3b45abdb2..8ef5f5960 100644
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -362,8 +362,11 @@ static gint sp_3dbox_context_root_handler(SPEventContext *event_context, GdkEven
if (event->motion.state & GDK_SHIFT_MASK && !bc->extruded) {
/* once shift is pressed, set bc->extruded (no need to create further faces;
- all of them are already created in sp_3dbox_init) */
+ all of them are already created in sp_3dbox_init); since we made the rear face
+ invisible in the beginning to avoid "flashing", we must set its correct style now */
bc->extruded = true;
+ g_assert (bc->item);
+ SP_3DBOX (bc->item)->faces[5]->set_style (NULL, true);
}
if (!bc->extruded) {
@@ -585,6 +588,8 @@ static void sp_3dbox_drag(SP3DBoxContext &bc, guint state)
for (int i = 0; i < 6; ++i) {
SP_3DBOX(bc.item)->faces[i]->hook_path_to_3dbox();
}
+ // make rear face invisible in the beginning to avoid "flashing"
+ SP_3DBOX (bc.item)->faces[5]->set_style (NULL, false);
bc.item->updateRepr();
sp_3dbox_set_z_orders (SP_3DBOX (bc.item));