mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-06 21:44:01 -06:00
D6: Moved file loading code
This commit is contained in:
parent
26fe0ddbb5
commit
3605403314
5 changed files with 69 additions and 5 deletions
|
@ -275,7 +275,7 @@ UM.MainWindow
|
|||
// There is no endsWith in this version of JS...
|
||||
if ((drop.urls[i].length <= 12) || (drop.urls[i].substring(drop.urls[i].length-12) !== ".curaprofile")) {
|
||||
// Drop an object
|
||||
UM.MeshFileHandler.readLocalFile(drop.urls[i]);
|
||||
Printer.readLocalFile(drop.urls[i]);
|
||||
if (imported_model == -1)
|
||||
{
|
||||
imported_model = i;
|
||||
|
@ -737,7 +737,7 @@ UM.MainWindow
|
|||
|
||||
for(var i in fileUrls)
|
||||
{
|
||||
UM.MeshFileHandler.readLocalFile(fileUrls[i])
|
||||
Printer.readLocalFile(fileUrls[i])
|
||||
}
|
||||
|
||||
var meshName = backgroundItem.getMeshName(fileUrls[0].toString())
|
||||
|
|
|
@ -26,7 +26,7 @@ Menu
|
|||
return (index + 1) + ". " + path.slice(path.lastIndexOf("/") + 1);
|
||||
}
|
||||
onTriggered: {
|
||||
UM.MeshFileHandler.readLocalFile(modelData);
|
||||
Printer.readLocalFile(modelData);
|
||||
var meshName = backgroundItem.getMeshName(modelData.toString())
|
||||
backgroundItem.hasMesh(decodeURIComponent(meshName))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue