}
std::cout << "CARGA COMPLETA" << std::endl;
file_open_selection->hide();
- id = listaItems.size()+lista_logic_Items.size()+2;
+
+ int id_1 = -1 , id_2 = -1;
+ std::list<CItem *>::iterator i = listaItems.begin();
+ while ( i != listaItems.end() ){
+ if ( (*i)->get_id() >= id_1 )
+ id_1 = (*i)->get_id();
+ i++;
+ }
+ id_1++;
+
+ i = lista_logic_Items.begin();
+ while ( i != lista_logic_Items.end() ){
+ if ( (*i)->get_id() >= id_2 )
+ id_2 = (*i)->get_id();
+ i++;
+ }
+ id_2++;
+ if ( id_1 < id_2 ) id = id_2;
+ else id = id_1;
}
void Constructor::on_btn_file_ok_clicked()