Skip to content

Commit

Permalink
Stop the forced load wirings dialog from appearing when there are no …
Browse files Browse the repository at this point in the history
…wirings to load
  • Loading branch information
ciaranj authored and ericabouaf committed Oct 28, 2010
1 parent 839b015 commit 6b8651d
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions plugins/editor/js/WiringEditor.js
Expand Up @@ -396,22 +396,23 @@ lang.extend(WireIt.WiringEditor, WireIt.BaseEditor, {
* @method onLoadSuccess
*/
onLoadSuccess: function(wirings) {

// Reset the internal structure
this.pipes = wirings;
this.pipesByName = {};
// Build the "pipesByName" index
for(var i = 0 ; i < this.pipes.length ; i++) {
this.pipesByName[ this.pipes[i].name] = this.pipes[i];
}
this.updateLoadPanelList();
if( wirings && wirings.length && wirings.length > 0 ) {
// Reset the internal structure
this.pipes = wirings;
this.pipesByName = {};

// Build the "pipesByName" index
for(var i = 0 ; i < this.pipes.length ; i++) {
this.pipesByName[ this.pipes[i].name] = this.pipes[i];
}

this.updateLoadPanelList();

// Check for autoload param and display the loadPanel otherwise
if(!this.checkAutoLoad()) {
this.loadPanel.show();
}
// Check for autoload param and display the loadPanel otherwise
if(!this.checkAutoLoad()) {
this.loadPanel.show();
}
}
},

/**
Expand Down

0 comments on commit 6b8651d

Please sign in to comment.