Commit 39823ac8 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

partial fix for #157: update secondary array attributes on "Apply" or "Ok"

parent aa1b281a
...@@ -539,7 +539,7 @@ function get_array_slot_4(attrs) { ...@@ -539,7 +539,7 @@ function get_array_slot_4(attrs) {
} }
function apply() { function apply() {
var i, attrs, gop, hide_name, slot_4; var gop, hide_name, slot_4;
// If this is a dialog to create a new array, we // If this is a dialog to create a new array, we
// skip the canvas dialog callback // skip the canvas dialog callback
if (!new_array_dialog) { if (!new_array_dialog) {
...@@ -564,11 +564,13 @@ function apply() { ...@@ -564,11 +564,13 @@ function apply() {
// Now send the array properties, in a separate // Now send the array properties, in a separate
// message for each array // message for each array
for (i = 0; i < pd_garray_attrs.length; i++) { pd_garray_attrs.forEach(function(attrs) {
attrs = pd_garray_attrs[i]; var i;
name = get_array_value("array_name", attrs); name = get_array_value("array_name", attrs);
var arr = name.split(""); var arr = name.split("");
for (var i = 0; i < arr.length; i++) { // This is a bit too complicated-- isn't there a standardized
// interface for doing this?
for (i = 0; i < arr.length; i++) {
if (arr[i] === "$" && i+1 < arr.length && if (arr[i] === "$" && i+1 < arr.length &&
arr[i+1] >= "0" && arr[i+1] <= "9") { arr[i+1] >= "0" && arr[i+1] <= "9") {
arr[i] = "#"; arr[i] = "#";
...@@ -587,8 +589,7 @@ function apply() { ...@@ -587,8 +589,7 @@ function apply() {
get_array_value("array_fill", attrs), get_array_value("array_fill", attrs),
get_array_value("array_outline", attrs) get_array_value("array_outline", attrs)
); );
});
}
} }
function cancel() { function cancel() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment