| 1273 | } |
| 1274 | |
| 1275 | int Map::findColorIndex(const MapColor* color) const |
| 1276 | { |
| 1277 | std::size_t size = color_set->colors.size(); |
| 1278 | for (std::size_t i = 0; i < size; ++i) |
| 1279 | { |
| 1280 | if (color_set->colors[i] == color) |
| 1281 | return (int)i; |
| 1282 | } |
| 1283 | if (color && color->getPriority() == MapColor::Registration) |
| 1284 | { |
| 1285 | return MapColor::Registration; |
| 1286 | } |
| 1287 | return -1; |
| 1288 | } |
| 1289 | |
| 1290 | void Map::setColorsDirty() |
| 1291 | { |