- ViewItem *tmp = find_item(*linea);
- x2 = tmp->x + tmp->out_x;
- y2 = tmp->y + tmp->out_y;
- if (tmp->get_open()) {
- gc->set_foreground(color_high);
+ ViewItem *tmp = find_item(linea->dst);
+ /* Si este item es un tanque */
+ if (linea->is_tank) {
+ if (linea->is_tank_lower) {
+ x2 = tmp->x + tmp->out_x;
+ y2 = tmp->y + tmp->out_y;
+ if (dynamic_cast<ViewTank *>(tmp)->get_out_inf()) {
+ gc->set_foreground(color_high);
+ } else {
+ gc->set_foreground(color_low);
+ }
+ } else {
+ x2 = tmp->x + tmp->in_x;
+ y2 = tmp->y + tmp->in_y;
+ if (dynamic_cast<ViewTank *>(tmp)->get_out_sup()) {
+ gc->set_foreground(color_high);
+ } else {
+ gc->set_foreground(color_low);
+ }
+ }