summaryrefslogtreecommitdiffstats
path: root/src/box3d-context.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2007-08-06 07:37:24 +0000
committercilix42 <cilix42@users.sourceforge.net>2007-08-06 07:37:24 +0000
commitde43f9fc6fc4f6f8e716924c7c6f1242d4b036a3 (patch)
tree8b0b862bd0b0eea74d9e1cdc04c7b833df75c54c /src/box3d-context.cpp
parentWorkaround for some segfaults: Store perspectives globally instead of in each... (diff)
downloadinkscape-de43f9fc6fc4f6f8e716924c7c6f1242d4b036a3.tar.gz
inkscape-de43f9fc6fc4f6f8e716924c7c6f1242d4b036a3.zip
First stage of draggable vanishing points (no snapping/unsnapping yet)
(bzr r3391)
Diffstat (limited to 'src/box3d-context.cpp')
-rw-r--r--src/box3d-context.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index 5f1029576..3096ad179 100644
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
@@ -113,6 +113,8 @@ static void sp_3dbox_context_init(SP3DBoxContext *box3d_context)
box3d_context->ctrl_dragged = false;
box3d_context->extruded = false;
+ box3d_context->_vpdrag = NULL;
+
new (&box3d_context->sel_changed_connection) sigc::connection();
}
@@ -123,6 +125,9 @@ static void sp_3dbox_context_dispose(GObject *object)
ec->enableGrDrag(false);
+ delete (bc->_vpdrag);
+ bc->_vpdrag = NULL;
+
bc->sel_changed_connection.disconnect();
bc->sel_changed_connection.~connection();
@@ -213,6 +218,8 @@ static void sp_3dbox_context_setup(SPEventContext *ec)
sigc::bind(sigc::ptr_fun(&sp_3dbox_context_selection_changed), (gpointer)bc)
);
+ bc->_vpdrag = new Box3D::VPDrag(ec->desktop);
+
if (prefs_get_int_attribute("tools.shapes", "selcue", 0) != 0) {
ec->enableSelectionCue();
}
@@ -520,6 +527,9 @@ static void sp_3dbox_drag(SP3DBoxContext &bc, guint state)
}
bc.item->updateRepr();
+ // TODO: It would be nice to show the VPs during dragging, but since there is no selection
+ // at this point (only after finishing the box), we must do this "manually"
+ bc._vpdrag->updateDraggers();
sp_canvas_force_full_redraw_after_interruptions(desktop->canvas, 5);
}