Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions Sources/Common/DataModel/DataSetAttributes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,9 @@ function vtkDataSetAttributes(publicAPI, model) {
);
return -1;
}
let currentAttribute = model[`active${attType}`];
if (currentAttribute >= 0 && currentAttribute < model.arrays.length) {
if (model.arrays[currentAttribute] === arr) {
return currentAttribute;
}
// FIXME setting an array actually changes its index
publicAPI.removeArrayByIndex(currentAttribute);
}

if (arr) {
currentAttribute = publicAPI.addArray(arr);
const currentAttribute = publicAPI.addArray(arr);
model[`active${attType}`] = currentAttribute;
} else {
model[`active${attType}`] = -1;
Expand Down