Allow rotating of symbols while placing them.
This commit is contained in:
parent
e40591feb8
commit
89b20380d3
|
@ -2132,12 +2132,20 @@ on_button_press (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
|
||||||
if (!self->priv->diagram)
|
if (!self->priv->diagram)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (event->button == 3 && self->priv->operation == OPER_0)
|
if (event->button == 3)
|
||||||
{
|
{
|
||||||
object = get_object_at_point (self, &point);
|
switch (self->priv->operation)
|
||||||
if (object && LD_IS_DIAGRAM_SYMBOL (object))
|
{
|
||||||
rotate_symbol (self, LD_DIAGRAM_SYMBOL (object));
|
case OPER_ADD_OBJECT:
|
||||||
return FALSE;
|
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)
|
if (event->button != 1)
|
||||||
|
|
Loading…
Reference in New Issue