gegl r2788 - in trunk: . bin
- From: ok svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2788 - in trunk: . bin
- Date: Thu, 20 Nov 2008 00:25:11 +0000 (UTC)
Author: ok
Date: Thu Nov 20 00:25:10 2008
New Revision: 2788
URL: http://svn.gnome.org/viewvc/gegl?rev=2788&view=rev
Log:
* bin/editor.c: (insert_node_after), (nodes_press_event): always
insert the same node type as the selected node when subdividing.
Modified:
trunk/ChangeLog
trunk/bin/editor.c
Modified: trunk/bin/editor.c
==============================================================================
--- trunk/bin/editor.c (original)
+++ trunk/bin/editor.c Thu Nov 20 00:25:10 2008
@@ -398,18 +398,26 @@
return 0;
}
+static gint override_node_after = -1;
static gint insert_node_after (gint argc, gchar **argv)
{
GeglPathItem knot;
if (tools.selected_no <0)
- return -1;
- knot = *gegl_path_get (tools.path, tools.selected_no);
+ {
+ override_node_after = -1;
+ return -1;
+ }
+ if (override_node_after != -1)
+ knot = *gegl_path_get (tools.path, override_node_after);
+ else
+ knot = *gegl_path_get (tools.path, tools.selected_no);
g_assert (argv[1] && argv[2]);
knot.point[0].x = atof (argv[1]);
knot.point[0].y = atof (argv[2]);
gegl_path_insert (tools.path, tools.selected_no, &knot);
tools.selected_no ++;
+ override_node_after = -1;
return 0;
}
@@ -754,6 +762,7 @@
{
gchar buf[256];
+ override_node_after = tools.selected_no; /* evil hack */
tools.selected_no = node_before;
sprintf (buf, "insert-node-after %f %f", ex, ey);
g_print ("%s %i\n", buf, node_before);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]