mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 06:23:59 -06:00
Refactoring; no longer use "Printer" to identify CuraApplication
This commit is contained in:
parent
e0c77231e0
commit
f82aecb7ca
14 changed files with 59 additions and 49 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue