From 615425cfc50df8d50ee637404d5c8b12a2f185aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20Fr=C3=B6hle?= Date: Mon, 9 Dec 2024 20:19:51 +0100 Subject: [PATCH] File Extensions for Import and Export File Extensions for Import and Export --- main/index.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/main/index.html b/main/index.html index 93d22597b..11acff2cf 100755 --- a/main/index.html +++ b/main/index.html @@ -591,7 +591,9 @@ dialog.showOpenDialog({ filters: [ - { name: 'CAD formats', extensions: ['svg', 'dxf', 'cdr'] } + { name: 'CAD formats', extensions: ['svg', 'dxf', 'cdr'] }, + { name: 'SVG', extensions: ['svg'] }, + { name: 'DXF', extensions: ['dxf'] } ], properties:['openFile', 'multiSelections'] @@ -1023,7 +1025,12 @@ var exportsvg = document.querySelector('#exportsvg'); exportsvg.onclick = function(){ - var fileName = dialog.showSaveDialogSync({title: 'Export Deepnest SVG'}); + var fileName = dialog.showSaveDialogSync({ + title: 'Export Deepnest SVG', + filters: [ + { name: 'SVG', extensions: ['svg'] } + ] + }); if(fileName === undefined){ console.log("No file selected"); @@ -1051,7 +1058,10 @@ var exportdxf = document.querySelector('#exportdxf'); exportdxf.onclick = function(){ var fileName = dialog.showSaveDialogSync({ - title: 'Export Deepnest DXF' + title: 'Export Deepnest DXF', + filters: [ + { name: 'DXF', extensions: ['dxf'] } + ] }) if(fileName === undefined){