From acb14a2b1b679c16e4d6425866a452a316e60f4e Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 31 Aug 2008 21:14:06 -0400 Subject: [PATCH] Remove node from workflow before removing associated element from canvas, make sure to actually set "active_node" to null when clearing the active node. --- static/scripts/galaxy.workflow_editor.canvas.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/static/scripts/galaxy.workflow_editor.canvas.js b/static/scripts/galaxy.workflow_editor.canvas.js index e967d24c962..5583dc003ca 100644 --- a/static/scripts/galaxy.workflow_editor.canvas.js +++ b/static/scripts/galaxy.workflow_editor.canvas.js @@ -252,8 +252,8 @@ $.extend( Node.prototype, { t.destroy(); $(t.element).draggable('destroy'); }); + workflow.remove_node( this ); $(this.element).draggable('destroy').remove(); - workflow.remove_node( this ); }, make_active : function () { $(this.element).addClass( "toolForm-active" ); @@ -442,6 +442,7 @@ $.extend( Workflow.prototype, { clear_active_node : function() { if ( this.active_node ) { this.active_node.make_inactive(); + this.active_node = null; } parent.show_form_for_tool( "
No node selected
" ); },