From 4f74edd42157dbfbd2c53ce8fbf7dd362d69638b Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 21 Feb 2017 14:27:56 +0100 Subject: [PATCH] Project name is now correctly set upon loading project CURA-3387 --- resources/qml/Cura.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/qml/Cura.qml b/resources/qml/Cura.qml index 264bec6d9a..b73bd21600 100644 --- a/resources/qml/Cura.qml +++ b/resources/qml/Cura.qml @@ -45,7 +45,7 @@ UM.MainWindow function getMeshName(path){ //takes the path the complete path of the meshname and returns only the filebase var fileName = path.slice(path.lastIndexOf("/") + 1) - var fileBase = fileName.slice(0, fileName.lastIndexOf(".")) + var fileBase = fileName.slice(0, fileName.indexOf(".")) return fileBase } @@ -786,6 +786,8 @@ UM.MainWindow { UM.WorkspaceFileHandler.readLocalFile(fileUrls[i]) } + var meshName = backgroundItem.getMeshName(fileUrls[0].toString()) + backgroundItem.hasMesh(decodeURIComponent(meshName)) } }