T466: Only one gcode file can be loaded at a time, and deleting previous gcode file when loading non-gcode file

Merge changes : Only call backgroundItem.hasMesh if/on an imported model (skips if only curaprofiles get loaded)
This commit is contained in:
Victor Larchenko 2016-10-23 14:53:25 +06:00 committed by Youness Alaoui
parent 1f84ad7084
commit b4a7173a61
4 changed files with 67 additions and 12 deletions

View file

@ -26,7 +26,7 @@ Menu
return (index + 1) + ". " + path.slice(path.lastIndexOf("/") + 1);
}
onTriggered: {
UM.MeshFileHandler.readLocalFile(modelData);
Printer.loadFile(modelData);
var meshName = backgroundItem.getMeshName(modelData.toString())
backgroundItem.hasMesh(decodeURIComponent(meshName))
}