------------------------------------------------------------------------------
| 332 | |
| 333 | //------------------------------------------------------------------------------ |
| 334 | void vtkDataArraySelection::CopySelections(vtkDataArraySelection* selections) |
| 335 | { |
| 336 | if (this == selections) |
| 337 | { |
| 338 | return; |
| 339 | } |
| 340 | |
| 341 | int needUpdate = 0; |
| 342 | int i; |
| 343 | const char* arrayName; |
| 344 | if (this->GetNumberOfArrays() != selections->GetNumberOfArrays()) |
| 345 | { |
| 346 | needUpdate = 1; |
| 347 | } |
| 348 | else |
| 349 | { |
| 350 | for (i = 0; i < this->GetNumberOfArrays(); i++) |
| 351 | { |
| 352 | arrayName = this->GetArrayName(i); |
| 353 | if (!selections->ArrayExists(arrayName)) |
| 354 | { |
| 355 | needUpdate = 1; |
| 356 | break; |
| 357 | } |
| 358 | if (selections->ArrayIsEnabled(arrayName) != this->ArrayIsEnabled(arrayName)) |
| 359 | { |
| 360 | needUpdate = 1; |
| 361 | break; |
| 362 | } |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | if (!needUpdate) |
| 367 | { |
| 368 | return; |
| 369 | } |
| 370 | |
| 371 | vtkDebugMacro("Copying arrays and settings from " << selections << "."); |
| 372 | this->Internal->Arrays = selections->Internal->Arrays; |
| 373 | this->Modified(); |
| 374 | } |
| 375 | |
| 376 | //------------------------------------------------------------------------------ |
| 377 | void vtkDataArraySelection::Union(vtkDataArraySelection* other, bool skipModified) |
no test coverage detected