]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/constructor.cpp
-Se conectan como trompada!!!!!
[z.facultad/75.42/plaqui.git] / Constructor / constructor.cpp
index aa162e92f67c90acd0de27a4a7de06fbc7a1bb9c..241abdb3f2d6f1627e74da12df3fec259901fe96 100644 (file)
@@ -272,11 +272,6 @@ void Constructor::on_not_drag_begin(const Glib::RefPtr<Gdk::DragContext>& contex
 void Constructor::on_item_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context, CItem *item)
 {
        context->set_icon(item->get_image(), 5, 5);
 void Constructor::on_item_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context, CItem *item)
 {
        context->set_icon(item->get_image(), 5, 5);
-       std::list<CItem *>::iterator i = listaItems.begin();
-       while ( i != listaItems.end() ){
-               (*i)->set_default_connector();
-               i++;
-       }
 }
 
 void Constructor::on_item_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time)
 }
 
 void Constructor::on_item_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, GtkSelectionData* selection_data, guint info, guint time)
@@ -382,9 +377,17 @@ void Constructor::on_item_drop_drag_received(const Glib::RefPtr<Gdk::DragContext
 void Constructor::on_btn_check_clicked()
 {
        std::list<CItem *>::iterator i = listaItems.begin();
 void Constructor::on_btn_check_clicked()
 {
        std::list<CItem *>::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;
        if ( !listaItems.empty() ) {
                while ( i != listaItems.end() ) {
                        CItem *temp = *i;
+                       std::cout<< "item="<<temp->get_name()<<" "<<"check= "<<temp->check_connection()<<std::endl;
                        if ( !temp->check_connection() ) {
                                dlg_connect->set_title("Error");
                                dlg_label->set_text("Los elementos no estan conectados\n\t\tcorrectamente");
                        if ( !temp->check_connection() ) {
                                dlg_connect->set_title("Error");
                                dlg_label->set_text("Los elementos no estan conectados\n\t\tcorrectamente");