]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/src/workplace.cpp
la ultima subida antes de irme a dormir
[z.facultad/75.42/plaqui.git] / Constructor / src / workplace.cpp
index 62757d2a17e3a2ea5f2e7199d3b648cb3dadd379..e19ae3b1ecf3ec369950d1b91b19f699cea7030b 100644 (file)
@@ -92,20 +92,39 @@ void WorkPlace::delete_line(int _id)
 {
        std::list<t_line>::iterator i = lista_lineas_in.begin();
        while ( i != lista_lineas_in.end() ){
-               if ( (*i).store->get_id() == _id || (*i).logic->get_id() == _id ) {
+               if ( (*i).store->get_id() == _id ) {
                        lista_lineas_in.erase(i);
                        i = lista_lineas_in.begin();
                }
                i++;
        }
+
+       i = lista_lineas_in.begin();
+       while ( i != lista_lineas_in.end() ){
+               if ( (*i).logic->get_id() == _id ) {
+                       lista_lineas_in.erase(i);
+                       i = lista_lineas_in.begin();
+               }
+               i++;
+       }
+
        i = lista_lineas_out.begin();
        while ( i != lista_lineas_out.end() ){
-               if ( (*i).store->get_id() == _id || (*i).logic->get_id() == _id ) {
+               if ( (*i).store->get_id() == _id ) {
                        lista_lineas_out.erase(i);
                        i = lista_lineas_out.begin();
                }
                i++;
        }       
+       i = lista_lineas_out.begin();
+       while ( i != lista_lineas_out.end() ){
+               if ( (*i).logic->get_id() == _id ) {
+                       lista_lineas_out.erase(i);
+                       i = lista_lineas_out.begin();
+               }
+               i++;
+       }       
+
 }
 
 void WorkPlace::update_logic_position()