From 0d72fb12dc9a570be45e2f25320ac49f604c3ed2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicol=C3=A1s=20Dimov?= Date: Wed, 19 Nov 2003 04:02:36 +0000 Subject: [PATCH] se borran las lineas al eliminar un item, esto no esta totalmente testeado --- Constructor/src/workplace.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Constructor/src/workplace.cpp b/Constructor/src/workplace.cpp index f526cb5..62757d2 100644 --- a/Constructor/src/workplace.cpp +++ b/Constructor/src/workplace.cpp @@ -92,17 +92,17 @@ void WorkPlace::delete_line(int _id) { std::list::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++; } - 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++; } -- 2.43.0