Fixed some selection editor problems (bug #127644):

2003-11-22  Sven Neumann  <sven@gimp.org>

	Fixed some selection editor problems (bug #127644):

	* plug-ins/sel2path/sel2path.c: use the given image_ID, ignore the
	drawable_ID. This plug-in doesn't operate on a drawable at all.

	* plug-ins/imagemap/imap_main.c: pass a valid image_ID to sel2path.

	* app/gui/vectors-commands.c: don't attempt to create a valid
	drawable_ID for the call to sel2path since it isn't used anyway.

	* app/core/gimpdrawable-stroke.c (gimp_drawable_stroke_boundary):
	just return when being called with an empty boundary.
This commit is contained in:
Sven Neumann
2003-11-22 13:38:11 +00:00
committed by Sven Neumann
parent c0c1043a6d
commit 722fb64dbd
6 changed files with 63 additions and 55 deletions

View File

@ -416,13 +416,14 @@ set_arrow_func(void)
}
static gboolean
fuzzy_select_on_button_press(GtkWidget *widget, GdkEventButton *event,
gpointer data)
fuzzy_select_on_button_press (GtkWidget *widget,
GdkEventButton *event,
gpointer data)
{
if (event->button == 1) {
gdouble rx = get_real_coord((gint) event->x);
gdouble ry = get_real_coord((gint) event->y);
gint32 image_ID = gimp_drawable_image(_drawable->drawable_id);
gint32 image_ID = gimp_drawable_image (_drawable->drawable_id);
gint32 channel_ID;
/* Save the old selection first */
@ -433,16 +434,17 @@ fuzzy_select_on_button_press(GtkWidget *widget, GdkEventButton *event,
GIMP_CHANNEL_OP_REPLACE,
FALSE, FALSE, 0, FALSE)) {
GimpParam *return_vals;
gint nreturn_vals;
gint nreturn_vals;
return_vals = gimp_run_procedure("plug_in_sel2path",
&nreturn_vals,
GIMP_PDB_INT32, TRUE,
GIMP_PDB_IMAGE, 0,
GIMP_PDB_DRAWABLE,
_drawable->drawable_id,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS) {
return_vals = gimp_run_procedure ("plug_in_sel2path",
&nreturn_vals,
GIMP_PDB_INT32, TRUE,
GIMP_PDB_IMAGE, image_ID,
GIMP_PDB_DRAWABLE, -1,
GIMP_PDB_END);
if (return_vals[0].data.d_status == GIMP_PDB_SUCCESS)
{
gdouble distance;
gchar *path_name = gimp_path_get_current(image_ID);
Object_t *object = create_polygon(NULL);