From 5607cf5afd8dde1a9fdd0c73f28158d74621b024 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 24 Feb 2015 18:11:54 +0100 Subject: [PATCH] Expose MeshFileHandler to QML and use it to set supported read/write file types --- Printer.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Printer.qml b/Printer.qml index 2161cfc500..e3e4fcc414 100644 --- a/Printer.qml +++ b/Printer.qml @@ -308,6 +308,8 @@ UM.MainWindow { //TODO: Support multiple file selection, workaround bug in KDE file dialog //selectMultiple: true + nameFilters: UM.MeshFileHandler.supportedReadFileTypes; + onAccepted: { UM.Controller.addMesh(fileUrl) @@ -323,6 +325,8 @@ UM.MainWindow { modality: UM.Application.platform == "linux" ? Qt.NonModal : Qt.Modal; + nameFilters: UM.MeshFileHandler.supportedWriteFileTypes + onAccepted: { Printer.saveGCode(fileUrl);