X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/4675818d2893c57a409498cd39dba6f9c18b6fe9..5b8bbc5a3c2db31a69a637f0e35e8435ad4d8ff3:/Constructor/constructor.cpp diff --git a/Constructor/constructor.cpp b/Constructor/constructor.cpp index aa162e9..241abdb 100644 --- a/Constructor/constructor.cpp +++ b/Constructor/constructor.cpp @@ -272,11 +272,6 @@ void Constructor::on_not_drag_begin(const Glib::RefPtr& contex void Constructor::on_item_drag_begin(const Glib::RefPtr& context, CItem *item) { context->set_icon(item->get_image(), 5, 5); - std::list::iterator i = listaItems.begin(); - while ( i != listaItems.end() ){ - (*i)->set_default_connector(); - i++; - } } void Constructor::on_item_drag_data_get(const Glib::RefPtr& context, GtkSelectionData* selection_data, guint info, guint time) @@ -382,9 +377,17 @@ void Constructor::on_item_drop_drag_received(const Glib::RefPtr::iterator i = listaItems.begin(); + while ( i != listaItems.end() ){ + (*i)->set_default_connector(); + (*i)->is_connected = false; + i++; + } + + i = listaItems.begin(); if ( !listaItems.empty() ) { while ( i != listaItems.end() ) { CItem *temp = *i; + std::cout<< "item="<get_name()<<" "<<"check= "<check_connection()<check_connection() ) { dlg_connect->set_title("Error"); dlg_label->set_text("Los elementos no estan conectados\n\t\tcorrectamente");