X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/d53ded00c10a30a17c7f0aad90acca933a7f4db9..34fb46485db0fb44f8dcc532866d988f8e54caa2:/Constructor/constructor.cpp diff --git a/Constructor/constructor.cpp b/Constructor/constructor.cpp index 0278ec0..deb918d 100644 --- a/Constructor/constructor.cpp +++ b/Constructor/constructor.cpp @@ -162,8 +162,17 @@ void Constructor::on_main_menu_save() } void Constructor::on_edit_menu_del() -{ - // hay que meter algo aca. +{ // OJO que borra al primero que encuentra con el mismo nombre!!! + std::list::iterator i = listaItems.begin(); + Glib::ustring pointed = combo_entry->get_text(); + while ( i != listaItems.end() ){ + CItem *temp = *i; + if ( temp->get_name() == pointed ){ + workplace->delete_item(temp->get_id()); + break; + } + i++; + } } void Constructor::on_chk_btn_clicked()