diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2011-03-06 13:41:01 +0100 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2011-03-07 17:29:26 +0100 |
commit | 89b20380d36fe35986fef6b8478a081c1255faff (patch) | |
tree | 1928e6c491955345bd3b2afcf46a641c2b307c45 /liblogdiag | |
parent | e40591feb81b02f868962fecce7de485b0959063 (diff) | |
download | logdiag-89b20380d36fe35986fef6b8478a081c1255faff.tar.gz logdiag-89b20380d36fe35986fef6b8478a081c1255faff.tar.xz logdiag-89b20380d36fe35986fef6b8478a081c1255faff.zip |
Allow rotating of symbols while placing them.
Diffstat (limited to 'liblogdiag')
-rw-r--r-- | liblogdiag/ld-diagram-view.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/liblogdiag/ld-diagram-view.c b/liblogdiag/ld-diagram-view.c index 9421bef..929d8a0 100644 --- a/liblogdiag/ld-diagram-view.c +++ b/liblogdiag/ld-diagram-view.c @@ -2132,12 +2132,20 @@ on_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data) if (!self->priv->diagram) return FALSE; - if (event->button == 3 && self->priv->operation == OPER_0) + if (event->button == 3) { - object = get_object_at_point (self, &point); - if (object && LD_IS_DIAGRAM_SYMBOL (object)) - rotate_symbol (self, LD_DIAGRAM_SYMBOL (object)); - return FALSE; + switch (self->priv->operation) + { + case OPER_ADD_OBJECT: + data = &OPER_DATA (self, add_object); + rotate_symbol (self, LD_DIAGRAM_SYMBOL (data->object)); + break; + case OPER_0: + object = get_object_at_point (self, &point); + if (object && LD_IS_DIAGRAM_SYMBOL (object)) + rotate_symbol (self, LD_DIAGRAM_SYMBOL (object)); + return FALSE; + } } if (event->button != 1) |