mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
838c7a5e89
commit
64ae67586a
@ -389,6 +389,7 @@ RED.keyboard = (function() {
|
|||||||
var currentEditorSettings = RED.settings.get('editor') || {};
|
var currentEditorSettings = RED.settings.get('editor') || {};
|
||||||
var userKeymap = currentEditorSettings.keymap || {};
|
var userKeymap = currentEditorSettings.keymap || {};
|
||||||
userKeymap[object.id] = null;
|
userKeymap[object.id] = null;
|
||||||
|
currentEditorSettings.keymap = userKeymap;
|
||||||
RED.settings.set('editor',currentEditorSettings);
|
RED.settings.set('editor',currentEditorSettings);
|
||||||
|
|
||||||
var obj = {
|
var obj = {
|
||||||
@ -442,6 +443,7 @@ RED.keyboard = (function() {
|
|||||||
var currentEditorSettings = RED.settings.get('editor') || {};
|
var currentEditorSettings = RED.settings.get('editor') || {};
|
||||||
var userKeymap = currentEditorSettings.keymap || {};
|
var userKeymap = currentEditorSettings.keymap || {};
|
||||||
userKeymap[object.id] = RED.keyboard.getShortcut(object.id);
|
userKeymap[object.id] = RED.keyboard.getShortcut(object.id);
|
||||||
|
currentEditorSettings.keymap = userKeymap;
|
||||||
RED.settings.set('editor',currentEditorSettings);
|
RED.settings.set('editor',currentEditorSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,8 +81,6 @@ module.exports = {
|
|||||||
writeFile: function(path,content,backupPath) {
|
writeFile: function(path,content,backupPath) {
|
||||||
if (backupPath) {
|
if (backupPath) {
|
||||||
try {
|
try {
|
||||||
console.log(path);
|
|
||||||
console.log(backupPath);
|
|
||||||
fs.renameSync(path,backupPath);
|
fs.renameSync(path,backupPath);
|
||||||
} catch(err) {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
Loading…
Reference in New Issue
Block a user