[hg] galaxy 1490: Remove node from workflow before removing asso...

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[hg] galaxy 1490: Remove node from workflow before removing asso...

greg
details:   http://www.bx.psu.edu/hg/galaxy/rev/cefbb71490a2
changeset: 1490:cefbb71490a2
user:      James Taylor <[hidden email]>
date:      Sun Aug 31 21:14:06 2008 -0400
description:
Remove node from workflow before removing associated element
from canvas, make sure to actually set "active_node" to null
when clearing the active node.

1 file(s) affected in this change:

static/scripts/galaxy.workflow_editor.canvas.js

diffs (21 lines):

diff -r 21534250600b -r cefbb71490a2 static/scripts/galaxy.workflow_editor.canvas.js
--- a/static/scripts/galaxy.workflow_editor.canvas.js Thu Aug 28 15:12:53 2008 -0400
+++ b/static/scripts/galaxy.workflow_editor.canvas.js Sun Aug 31 21:14:06 2008 -0400
@@ -252,8 +252,8 @@
             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 @@
     clear_active_node : function() {
         if ( this.active_node ) {
             this.active_node.make_inactive();
+            this.active_node = null;
         }
         parent.show_form_for_tool( "<div>No node selected</div>" );
     },