Skip to content

Commit

Permalink
Hotfix #220
Browse files Browse the repository at this point in the history
  • Loading branch information
kinimesi committed Dec 25, 2017
1 parent ecac2ee commit 1d0b685
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/js/app-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -1943,6 +1943,10 @@ appUtilities.launchWithModelFile = function() {
loadFromURI(uri_path, chiseInstance, promptInvalidURIWarning);

function loadFromURL(filepath, chiseInstance, promptInvalidURLWarning){
// get current general properties
var cyInstance = chiseInstance.getCy();
var currentGeneralProperties = appUtilities.getScratch(cyInstance, 'currentGeneralProperties');
var currentInferNestingOnLoad = currentGeneralProperties.inferNestingOnLoad;

var loadCallbackSBGNMLValidity = function (text) {
$.ajax({
Expand Down Expand Up @@ -1993,12 +1997,18 @@ appUtilities.launchWithModelFile = function() {
lastModified: Date.now()
});

currentGeneralProperties.inferNestingOnLoad = true;
chiseInstance.loadSBGNMLFile(fileToLoad, loadCallbackSBGNMLValidity, loadCallbackInvalidityWarning);
},
error: function(xhr, ajaxOptions, thrownError){
loadCallbackInvalidityWarning();
}
});

$(document).one("sbgnvizLoadFileEnd", function(){
currentGeneralProperties.inferNestingOnLoad = currentInferNestingOnLoad;
appUtilities.mapTabGeneralPanel.render();
});

}

Expand Down

0 comments on commit 1d0b685

Please sign in to comment.