From c0df682bb52a8bcab7c182fb45b340814b2eada8 Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Fri, 5 Dec 2003 02:55:28 +0000 Subject: [PATCH] Se arregla un error de conexion en un caso particular de las compuertas --- Model/src/simulator.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Model/src/simulator.cpp b/Model/src/simulator.cpp index 7811d4e..be68005 100644 --- a/Model/src/simulator.cpp +++ b/Model/src/simulator.cpp @@ -608,7 +608,13 @@ void Simulator::connect_logic(LogicControl *current, xmlNodePtr nodo) current->connect( item->get_logic_output(), IConector::IN ); } } else { - std::cout << "ERROR : Item no es tipo Control!!" << std::endl; + LogicControl *logic = dynamic_cast(find_logic((char *)XML_GET_CONTENT(nodo->children))); + /* Bien, si no era un control, debe ser una compuerta */ + if (logic != NULL) { + current->connect(logic, IConector::IN); + } else { + std::cout << "ERROR : Item no es tipo Control ni tipo LogicControl ... esto si que esta todo malllll!!" << std::endl; + } } } else if (xmlStrcmp(nodo->name, BAD_CAST"salida") == 0) { item = dynamic_cast(find((char *)XML_GET_CONTENT(nodo->children))); -- 2.43.0