diff options
author | Jaime van Kessel <nallath@gmail.com> | 2017-03-30 21:19:05 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2017-03-30 21:19:05 +0300 |
commit | f82aecb7caefb0334df39687c85adc8ebf6e3812 (patch) | |
tree | e974fc1a60730f34fafa9522403e49447e408b74 /resources/qml/Menus/RecentFilesMenu.qml | |
parent | e0c77231e0a1fa0d926062d62473ff4a98366af9 (diff) |
Refactoring; no longer use "Printer" to identify CuraApplication
Diffstat (limited to 'resources/qml/Menus/RecentFilesMenu.qml')
-rw-r--r-- | resources/qml/Menus/RecentFilesMenu.qml | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/resources/qml/Menus/RecentFilesMenu.qml b/resources/qml/Menus/RecentFilesMenu.qml index 8c685f6987..e00a32768d 100644 --- a/resources/qml/Menus/RecentFilesMenu.qml +++ b/resources/qml/Menus/RecentFilesMenu.qml @@ -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)) } |