From 64ae67586ac6391e21177cebf502b0a1e48e9159 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sun, 15 Apr 2018 11:43:03 +0100 Subject: [PATCH] Ensure keyboard shortcuts get saved in runtime settings Fixes #1696 --- editor/js/ui/keyboard.js | 2 ++ red/runtime/storage/localfilesystem/util.js | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/editor/js/ui/keyboard.js b/editor/js/ui/keyboard.js index ca294be78..c34ad2711 100644 --- a/editor/js/ui/keyboard.js +++ b/editor/js/ui/keyboard.js @@ -389,6 +389,7 @@ RED.keyboard = (function() { var currentEditorSettings = RED.settings.get('editor') || {}; var userKeymap = currentEditorSettings.keymap || {}; userKeymap[object.id] = null; + currentEditorSettings.keymap = userKeymap; RED.settings.set('editor',currentEditorSettings); var obj = { @@ -442,6 +443,7 @@ RED.keyboard = (function() { var currentEditorSettings = RED.settings.get('editor') || {}; var userKeymap = currentEditorSettings.keymap || {}; userKeymap[object.id] = RED.keyboard.getShortcut(object.id); + currentEditorSettings.keymap = userKeymap; RED.settings.set('editor',currentEditorSettings); } } diff --git a/red/runtime/storage/localfilesystem/util.js b/red/runtime/storage/localfilesystem/util.js index 6fb75d255..f677bdd38 100644 --- a/red/runtime/storage/localfilesystem/util.js +++ b/red/runtime/storage/localfilesystem/util.js @@ -81,8 +81,6 @@ module.exports = { writeFile: function(path,content,backupPath) { if (backupPath) { try { - console.log(path); - console.log(backupPath); fs.renameSync(path,backupPath); } catch(err) { console.log(err);