]> git.llucax.com Git - z.facultad/75.42/plaqui.git/commitdiff
se borran las lineas al eliminar un item, esto no esta totalmente testeado
authorNicolás Dimov <ndimov@gmail.com>
Wed, 19 Nov 2003 04:02:36 +0000 (04:02 +0000)
committerNicolás Dimov <ndimov@gmail.com>
Wed, 19 Nov 2003 04:02:36 +0000 (04:02 +0000)
Constructor/src/workplace.cpp

index f526cb56da8a27eb68d9886bbe620169a291d2cd..62757d2a17e3a2ea5f2e7199d3b648cb3dadd379 100644 (file)
@@ -92,17 +92,17 @@ void WorkPlace::delete_line(int _id)
 {
        std::list<t_line>::iterator i = lista_lineas_in.begin();
        while ( i != lista_lineas_in.end() ){
 {
        std::list<t_line>::iterator i = lista_lineas_in.begin();
        while ( i != lista_lineas_in.end() ){
-               if ( (*i).store->get_id() == _id ) {
+               if ( (*i).store->get_id() == _id || (*i).logic->get_id() == _id ) {
                        lista_lineas_in.erase(i);
                        i = lista_lineas_in.begin();
                }
                i++;
        }
                        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 = lista_lineas_out.begin();
+       while ( i != lista_lineas_out.end() ){
+               if ( (*i).store->get_id() == _id || (*i).logic->get_id() == _id ) {
+                       lista_lineas_out.erase(i);
+                       i = lista_lineas_out.begin();
                }
                i++;
        }       
                }
                i++;
        }