Refactoring; no longer use "Printer" to identify CuraApplication

This commit is contained in:
Jaime van Kessel 2017-03-30 20:19:05 +02:00
parent e0c77231e0
commit f82aecb7ca
14 changed files with 59 additions and 49 deletions

View file

@ -13,11 +13,11 @@ Menu
title: catalog.i18nc("@title:menu menubar:file", "Open &Recent")
iconName: "document-open-recent";
enabled: Printer.recentFiles.length > 0;
enabled: CuraApplication.recentFiles.length > 0;
Instantiator
{
model: Printer.recentFiles
model: CuraApplication.recentFiles
MenuItem
{
text:
@ -36,11 +36,13 @@ Menu
var choice = UM.Preferences.getValue("cura/choice_on_open_project");
if (choice == "open_as_project")
{
toOpenAsProject = true;
else if (choice == "open_as_model")
}else if (choice == "open_as_model"){
toOpenAsModel = true;
else
}else{
toShowDialog = true;
}
}
else {
toOpenAsModel = true;
@ -54,9 +56,13 @@ Menu
// open file in the prefered way
if (toOpenAsProject)
{
UM.WorkspaceFileHandler.readLocalFile(modelData);
}
else if (toOpenAsModel)
Printer.readLocalFile(modelData);
{
CuraApplication.readLocalFile(modelData);
}
var meshName = backgroundItem.getMeshName(modelData.toString())
backgroundItem.hasMesh(decodeURIComponent(meshName))
}