MCPcopy Create free account
hub / github.com/chrxh/alien / onChangeColor

Method onChangeColor

source/Gui/ChangeColorDialog.cpp:67–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void 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}

Callers

nothing calls this directly

Calls 4

getGenomeMethod · 0.80
setGenomeMethod · 0.80

Tested by

no test coverage detected