X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/4c30f5939017e47c70f79df3a9f737d9ea743db5..c89fed66c4fa3004270e84562e62b796f1208293:/Model/src/plantitem.cpp?ds=inline diff --git a/Model/src/plantitem.cpp b/Model/src/plantitem.cpp index 50d8e98..34360b0 100644 --- a/Model/src/plantitem.cpp +++ b/Model/src/plantitem.cpp @@ -31,6 +31,7 @@ void PlantItem::recieve_msg(int msg, IConector *who, void *data) case MSG_QUERY_COLOR: if (color_updated) { who->recieve_msg(MSG_RESPONSE_COLOR, this, &fluid_color); + return; } update_color(); who->recieve_msg(MSG_RESPONSE_COLOR, this, &fluid_color); @@ -50,8 +51,8 @@ void PlantItem::update_color() { if (color_updated) return; - send_msg(IConector::IN, MSG_QUERY_COLOR); color_updated = true; + send_msg(IConector::IN, MSG_QUERY_COLOR); } void PlantItem::get_state_as_xml(std::stringstream &out) @@ -66,5 +67,5 @@ void PlantItem::get_state_as_xml(std::stringstream &out) out << "\t" << std::endl; // Para que quede bonito - actual_flow = 99999; + actual_flow = INFINITO; }