Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 6010f256 authored by Kevin Coulomb's avatar Kevin Coulomb
Browse files

Correction d'un bug sur un map pour l'affichage des couleurs

parent ddcfb905
No related branches found
No related tags found
No related merge requests found
......@@ -242,14 +242,17 @@ public:
state = *i;
map<std::string, Value *>::const_iterator field;
field = state->get_value()->get_extra_fields()->find(std::string("Color"));
// Search the color
if (state->get_value() &&
(field = state->get_value()->get_extra_fields()->find(std::string("Color"))) != extra_fields->end()) {
// Mind the map, may be the source of a bug
if (!state->get_value()->get_extra_fields()->empty() &&
state->get_value() &&
(field != extra_fields->end())) {
/* Call the object state drawing function with the state color */
color = (const Color *)(*field).second;
draw_state(draw_object, state->get_start_time().get_value(), state->get_end_time().get_value(), position,
0,0,0);
// color->get_red(), color->get_green(), color->get_blue());
// 0,0,0);
color->get_red(), color->get_green(), color->get_blue());
}
else {
/* Call the object state drawing function with default color */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment