Draw diagram objects in reversed order.
Previously older objects drew on top of newer ones.
This commit is contained in:
parent
911fac4c2f
commit
8243114d09
|
@ -1246,18 +1246,18 @@ draw_terminal (GtkWidget *widget, DrawData *data)
|
||||||
static void
|
static void
|
||||||
draw_diagram (GtkWidget *widget, DrawData *data)
|
draw_diagram (GtkWidget *widget, DrawData *data)
|
||||||
{
|
{
|
||||||
GList *objects;
|
GList *objects, *iter;
|
||||||
|
|
||||||
if (!data->self->priv->diagram)
|
if (!data->self->priv->diagram)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cairo_save (data->cr);
|
cairo_save (data->cr);
|
||||||
|
|
||||||
cairo_set_line_width (data->cr, 1 / data->scale);
|
cairo_set_line_width (data->cr, 1 / data->scale);
|
||||||
|
|
||||||
/* Draw objects from the diagram. */
|
/* Draw objects from the diagram, from bottom to top. */
|
||||||
objects = ld_diagram_get_objects (data->self->priv->diagram);
|
objects = (GList *) ld_diagram_get_objects (data->self->priv->diagram);
|
||||||
g_list_foreach (objects, (GFunc) draw_object, data);
|
for (iter = g_list_last (objects); iter; iter = g_list_previous (iter))
|
||||||
|
draw_object (LD_DIAGRAM_OBJECT (iter->data), data);
|
||||||
|
|
||||||
switch (data->self->priv->operation)
|
switch (data->self->priv->operation)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue