| 65 | } |
| 66 | |
| 67 | void ChangeColorDialog::onChangeColor(GenomeDescription& genome) |
| 68 | { |
| 69 | for (auto& node : genome.cells) { |
| 70 | if (node.color == _sourceColor) { |
| 71 | node.color = _targetColor; |
| 72 | } |
| 73 | if (_includeSubGenomes) { |
| 74 | if (auto subGenome = node.getGenome()) { |
| 75 | auto subGenomeDesc = GenomeDescriptionService::get().convertBytesToDescription(*subGenome); |
| 76 | onChangeColor(subGenomeDesc); |
| 77 | auto newSubGenome = GenomeDescriptionService::get().convertDescriptionToBytes(subGenomeDesc); |
| 78 | node.setGenome(newSubGenome); |
| 79 | } |
| 80 | } |
| 81 | } |
| 82 | } |
nothing calls this directly
no test coverage detected