[dia] Add modifiers to undo_move_handle
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] Add modifiers to undo_move_handle
- Date: Fri, 16 Jan 2015 22:33:10 +0000 (UTC)
commit 522d89692525a4c8f9881f1dd03479cb3c2b889a
Author: Paul Chavent <paul chavent fnac net>
Date: Thu Jan 15 23:22:39 2015 +0100
Add modifiers to undo_move_handle
Signed-off-by: Hans Breuer <hans breuer org>
app/modify_tool.c | 2 +-
app/undo.c | 11 ++++++++---
app/undo.h | 3 ++-
3 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/app/modify_tool.c b/app/modify_tool.c
index e85fd6f..a7f9678 100644
--- a/app/modify_tool.c
+++ b/app/modify_tool.c
@@ -754,7 +754,7 @@ modify_button_release(ModifyTool *tool, GdkEventButton *event,
if (tool->orig_pos != NULL) {
undo_move_handle(ddisp->diagram, tool->handle, tool->object,
- *tool->orig_pos, tool->last_to);
+ *tool->orig_pos, tool->last_to, gdk_event_to_dia_ModifierKeys(event->state));
}
/* Final move: */
diff --git a/app/undo.c b/app/undo.c
index 299069a..55201f2 100644
--- a/app/undo.c
+++ b/app/undo.c
@@ -441,6 +441,8 @@ struct MoveHandleChange {
Point dest_pos;
Handle *handle;
DiaObject *obj;
+
+ int modifiers;
};
static void
@@ -449,7 +451,7 @@ move_handle_apply(struct MoveHandleChange *change, Diagram *dia)
object_add_updates(change->obj, dia);
change->obj->ops->move_handle(change->obj, change->handle,
&change->dest_pos, NULL,
- HANDLE_MOVE_USER_FINAL, 0);
+ HANDLE_MOVE_USER_FINAL, change->modifiers);
object_add_updates(change->obj, dia);
diagram_update_connections_object(dia, change->obj, TRUE);
}
@@ -460,7 +462,7 @@ move_handle_revert(struct MoveHandleChange *change, Diagram *dia)
object_add_updates(change->obj, dia);
change->obj->ops->move_handle(change->obj, change->handle,
&change->orig_pos, NULL,
- HANDLE_MOVE_USER_FINAL, 0);
+ HANDLE_MOVE_USER_FINAL, change->modifiers);
object_add_updates(change->obj, dia);
diagram_update_connections_object(dia, change->obj, TRUE);
}
@@ -474,7 +476,8 @@ move_handle_free(struct MoveHandleChange *change)
Change *
undo_move_handle(Diagram *dia,
Handle *handle, DiaObject *obj,
- Point orig_pos, Point dest_pos)
+ Point orig_pos, Point dest_pos,
+ int modifiers)
{
struct MoveHandleChange *change;
@@ -489,6 +492,8 @@ undo_move_handle(Diagram *dia,
change->handle = handle;
change->obj = obj;
+ change->modifiers = modifiers;
+
DEBUG_PRINTF(("UNDO: Push new move handle at %d\n", depth(dia->undo)));
undo_push_change(dia->undo, (Change *) change);
diff --git a/app/undo.h b/app/undo.h
index 4b2e4fc..438a441 100644
--- a/app/undo.h
+++ b/app/undo.h
@@ -63,7 +63,8 @@ Change *undo_move_objects(Diagram *dia, Point *orig_pos,
Point *dest_pos, GList *obj_list);
Change *undo_move_handle(Diagram *dia,
Handle *handle, DiaObject *obj,
- Point orig_pos, Point dest_pos);
+ Point orig_pos, Point dest_pos,
+ int modifiers);
Change *undo_connect(Diagram *dia, DiaObject *obj, Handle *handle,
ConnectionPoint *connectionpoint);
Change *undo_unconnect(Diagram *dia, DiaObject *obj, Handle *handle);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]