From a972c1a31a27a5d5e54ddce4845c53e2e669be2f Mon Sep 17 00:00:00 2001 From: bordun Date: Sat, 20 Mar 2021 15:52:43 +0100 Subject: [PATCH] editor: incremental pasting issue with address property --- CHANGELOG.md | 1 + src/client/editor/data-workers.js | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2929755a..05770bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - bug fixes - `alt+shift+c` not working when pressed before dragging + - incremental pasting issue with address property - editor - add `mod+d` and `mod+shift+d` for duplicating widgets diff --git a/src/client/editor/data-workers.js b/src/client/editor/data-workers.js index 124ca0d3..27072acc 100644 --- a/src/client/editor/data-workers.js +++ b/src/client/editor/data-workers.js @@ -184,10 +184,12 @@ var incrementWidget = function(data, root){ data.address = 'auto' - } else if (!address.match(/^auto|\/control|\/note|\/program|\/sysex|\/key_pressure|\/channel_pressure|\/pitch/) !== 'auto') { + } else if (!address.match(/^(auto|\/control|\/note|\/program|\/sysex|\/mtc|\/key_pressure|\/channel_pressure|\/pitch)$/)) { + + var addressref = widgetManager.createAddressRef(null, data.preArgs,address) - var addressref while (fakeStore.address.indexOf(address) != -1 || widgetManager.getWidgetByAddress(addressref).length) { + address = address.replace(/([0-9]*)$/,function(m){ var n = parseInt(m)+1 n = isNaN(n)?1:n