Commit dd58a64a authored by Sven Neumann's avatar Sven Neumann
Browse files

Fixed the deletion of paths that I broke with my last change.


--Sven
parent d75bb8c2
Sun Jul 11 14:05:06 MEST 1999 Sven Neumann <sven@gimp.org>
* app/paths_dialog.c: my last change did break path deletion - this
should be fixed now
Sat Jul 10 16:05:58 1999 ape@gandalf.spacetec.no (Asbjorn Pettersen)
* plug-ins/sel2path/math.c:
......
......@@ -1018,9 +1018,9 @@ paths_unselect_row (GtkWidget *widget,
if(!pwidget)
return;
bzp = (PATHP)g_slist_nth_data(paths_dialog->current_path_list->bz_paths,row);
bzp = pwidget->bzp;
g_return_if_fail(bzp != NULL);
g_return_if_fail (bzp != NULL);
if (column && bzp->locked)
{
......@@ -1380,6 +1380,13 @@ paths_dialog_delete_path_callback (GtkWidget * widget, gpointer udata)
new_sz = (g_slist_length(plp->bz_paths) > 0);
path_free(bzp,NULL);
/* Remove from the clist ... */
gtk_signal_handler_block_by_data (GTK_OBJECT (paths_dialog->paths_list),
paths_dialog);
gtk_clist_remove (GTK_CLIST (paths_dialog->paths_list), row);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (paths_dialog->paths_list),
paths_dialog);
/* If now empty free everything up */
if(!plp->bz_paths || g_slist_length(plp->bz_paths) == 0)
{
......@@ -1390,10 +1397,6 @@ paths_dialog_delete_path_callback (GtkWidget * widget, gpointer udata)
paths_dialog->current_path_list = NULL;
}
/* Do this last since it might cause a new row to become selected */
/* Remove from the clist ... */
gtk_clist_remove(GTK_CLIST(paths_dialog->paths_list),row);
paths_ops_button_set_sensitive(DUP_PATH_BUTTON,new_sz);
paths_ops_button_set_sensitive(DEL_PATH_BUTTON,new_sz);
paths_ops_button_set_sensitive(STROKE_PATH_BUTTON,new_sz);
......
......@@ -1018,9 +1018,9 @@ paths_unselect_row (GtkWidget *widget,
if(!pwidget)
return;
bzp = (PATHP)g_slist_nth_data(paths_dialog->current_path_list->bz_paths,row);
bzp = pwidget->bzp;
g_return_if_fail(bzp != NULL);
g_return_if_fail (bzp != NULL);
if (column && bzp->locked)
{
......@@ -1380,6 +1380,13 @@ paths_dialog_delete_path_callback (GtkWidget * widget, gpointer udata)
new_sz = (g_slist_length(plp->bz_paths) > 0);
path_free(bzp,NULL);
/* Remove from the clist ... */
gtk_signal_handler_block_by_data (GTK_OBJECT (paths_dialog->paths_list),
paths_dialog);
gtk_clist_remove (GTK_CLIST (paths_dialog->paths_list), row);
gtk_signal_handler_unblock_by_data (GTK_OBJECT (paths_dialog->paths_list),
paths_dialog);
/* If now empty free everything up */
if(!plp->bz_paths || g_slist_length(plp->bz_paths) == 0)
{
......@@ -1390,10 +1397,6 @@ paths_dialog_delete_path_callback (GtkWidget * widget, gpointer udata)
paths_dialog->current_path_list = NULL;
}
/* Do this last since it might cause a new row to become selected */
/* Remove from the clist ... */
gtk_clist_remove(GTK_CLIST(paths_dialog->paths_list),row);
paths_ops_button_set_sensitive(DUP_PATH_BUTTON,new_sz);
paths_ops_button_set_sensitive(DEL_PATH_BUTTON,new_sz);
paths_ops_button_set_sensitive(STROKE_PATH_BUTTON,new_sz);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment