Fixed a problem in gradient.c where if a gradient was selected via the PDB

Wed Oct 21 23:37:01 BST 1998 Andy Thomas <alt@picnic.demon.co.uk>

	Fixed a problem in gradient.c where if a gradient was selected
	via the PDB and the editor has not been displayed on the screen
	gimp would crash.
This commit is contained in:
BST 1998 Andy Thomas 1998-10-21 22:47:06 +00:00 committed by Andy Thomas
parent e1c61471b0
commit 80c62daae7
5 changed files with 59 additions and 8 deletions

View File

@ -1,4 +1,11 @@
Wed Oct 21 23:37:01 BST 1998 Andy Thomas <alt@picnic.demon.co.uk>
Fixed a problem in gradient.c where if a gradient was selected
via the PDB and the editor has not been displayed on the screen
gimp would crash.
Wed Oct 21 22:38:07 BST 1998 Andy Thomas <alt@picnic.demon.co.uk>
* plug-ins/script-fu/scripts/beveled-pattern-arrow.scm

View File

@ -6356,8 +6356,19 @@ gradients_set_active_invoker(Argument *args)
success = TRUE;
/* Select that gradient in the listbox */
gtk_clist_select_row(GTK_CLIST(g_editor->clist),n,-1);
gtk_clist_moveto(GTK_CLIST(g_editor->clist),n,0,0.5,0.0);
/* Only if gradient editor has been created */
if(g_editor)
{
gtk_clist_select_row(GTK_CLIST(g_editor->clist),n,-1);
gtk_clist_moveto(GTK_CLIST(g_editor->clist),n,0,0.5,0.0);
}
else
{
/* force internal structs to use selected gradient */
GSList* tmp = g_slist_nth(gradients_list,n);
if(tmp)
curr_gradient = (gradient_t *)(tmp->data);
}
break;
} /* if */

View File

@ -6356,8 +6356,19 @@ gradients_set_active_invoker(Argument *args)
success = TRUE;
/* Select that gradient in the listbox */
gtk_clist_select_row(GTK_CLIST(g_editor->clist),n,-1);
gtk_clist_moveto(GTK_CLIST(g_editor->clist),n,0,0.5,0.0);
/* Only if gradient editor has been created */
if(g_editor)
{
gtk_clist_select_row(GTK_CLIST(g_editor->clist),n,-1);
gtk_clist_moveto(GTK_CLIST(g_editor->clist),n,0,0.5,0.0);
}
else
{
/* force internal structs to use selected gradient */
GSList* tmp = g_slist_nth(gradients_list,n);
if(tmp)
curr_gradient = (gradient_t *)(tmp->data);
}
break;
} /* if */

View File

@ -6356,8 +6356,19 @@ gradients_set_active_invoker(Argument *args)
success = TRUE;
/* Select that gradient in the listbox */
gtk_clist_select_row(GTK_CLIST(g_editor->clist),n,-1);
gtk_clist_moveto(GTK_CLIST(g_editor->clist),n,0,0.5,0.0);
/* Only if gradient editor has been created */
if(g_editor)
{
gtk_clist_select_row(GTK_CLIST(g_editor->clist),n,-1);
gtk_clist_moveto(GTK_CLIST(g_editor->clist),n,0,0.5,0.0);
}
else
{
/* force internal structs to use selected gradient */
GSList* tmp = g_slist_nth(gradients_list,n);
if(tmp)
curr_gradient = (gradient_t *)(tmp->data);
}
break;
} /* if */

View File

@ -6356,8 +6356,19 @@ gradients_set_active_invoker(Argument *args)
success = TRUE;
/* Select that gradient in the listbox */
gtk_clist_select_row(GTK_CLIST(g_editor->clist),n,-1);
gtk_clist_moveto(GTK_CLIST(g_editor->clist),n,0,0.5,0.0);
/* Only if gradient editor has been created */
if(g_editor)
{
gtk_clist_select_row(GTK_CLIST(g_editor->clist),n,-1);
gtk_clist_moveto(GTK_CLIST(g_editor->clist),n,0,0.5,0.0);
}
else
{
/* force internal structs to use selected gradient */
GSList* tmp = g_slist_nth(gradients_list,n);
if(tmp)
curr_gradient = (gradient_t *)(tmp->data);
}
break;
} /* if */