X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/43aa212b9816129a8a2b08a8848bca407ef0129f..07f4e929e15451f6af8ec4d941bcee6742917d0d:/Constructor/constructor.cpp?ds=inline diff --git a/Constructor/constructor.cpp b/Constructor/constructor.cpp index af1263b..7553c91 100644 --- a/Constructor/constructor.cpp +++ b/Constructor/constructor.cpp @@ -176,17 +176,19 @@ void Constructor::on_item_drop_drag_received(const Glib::RefPtrlength >= 0) && (selection_data->format == 8)) { CItem *a; if (strcmp((const char *)selection_data->data, "item_codo.png")==0) - a = new Splitter();//Gtk::manage( new Splitter() ); + a = new Splitter(); else if (strcmp((const char *)selection_data->data, "item_canio.png")==0) - a = new Conduct();//Gtk::manage( new Conduct() ); + a = new Conduct(); else if (strcmp((const char *)selection_data->data, "item_y.png")==0) - a = new Union();//Gtk::manage( new Union() ); + a = new Union(); else if (strcmp((const char *)selection_data->data, "item_tanque.png")==0) - a = new Cistern();//Gtk::manage( new Cistern() ); + a = new Cistern(); else - a = new CItem();//Gtk::manage( new CItem((const char *)selection_data->data) ); + a = new CItem(); //Seteo el ID del item + Glib::ustring name("item"); a->set_id(++id); + a->set_name( name ); if ( can_drop(a, i*32, j*32) ) { workplace->put(*a, i*32, j*32); //Apunto al workplace