Skip to content

Commit fc59a36

Browse files
committed
Fix default file name when saving selection with Edit > Copy To
This also fixes an error in the Electron app with Edit > Copy To: Error occurred in handler for 'show-save-dialog': TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined at new NodeError (node:internal/errors:371:5) at validateString (node:internal/validators:120:11) at Object.basename (node:path:752:5) at C:\...\jspaint\src\electron-main.js:469:45 at node:electron/js2c/browser_init:189:579 at EventEmitter.<anonymous> (node:electron/js2c/browser_init:161:11327) at EventEmitter.emit (node:events:526:28) { code: 'ERR_INVALID_ARG_TYPE' }
1 parent 2fe8c35 commit fc59a36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/functions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4078,7 +4078,7 @@ function save_selection_to_file() {
40784078
if (selection && selection.canvas) {
40794079
systemHooks.showSaveFileDialog({
40804080
dialogTitle: localize("Save As"),
4081-
defaultName: "selection.png",
4081+
defaultFileName: "selection.png",
40824082
defaultFileFormatID: "image/png",
40834083
formats: image_formats,
40844084
getBlob: (new_file_type) => {

0 commit comments

Comments
 (0)