X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/5cbc99c3a2b9f375a02fb0c1b175da38a8979e43..c9f8c0bc99fea35db2944e60ef14441c2c056746:/Constructor/constructor.cpp?ds=sidebyside diff --git a/Constructor/constructor.cpp b/Constructor/constructor.cpp index 98fbb78..aa27c53 100644 --- a/Constructor/constructor.cpp +++ b/Constructor/constructor.cpp @@ -24,6 +24,7 @@ Constructor::Constructor(BaseObjectType* cobject, const Glib::RefPtrget_widget("btn_check",btn_check); refGlade->get_widget("dlg_connect", dlg_connect); refGlade->get_widget("btn_dlg_close", btn_dlg_close); + refGlade->get_widget("dlg_label", dlg_label); refGlade->get_widget_derived("workplace", workplace); //fixed @@ -270,12 +271,19 @@ void Constructor::on_item_drop_drag_received(const Glib::RefPtr::iterator i = listaItems.begin(); - while ( i != listaItems.end() ) { - CItem *temp = *i; - if ( !temp->check_connection() ) { - dlg_connect->show(); - break; + if ( !listaItems.empty() ) { + while ( i != listaItems.end() ) { + CItem *temp = *i; + if ( !temp->check_connection() ) { + dlg_connect->set_title("Error"); + dlg_label->set_text("Los elementos no estan conectados\n\t\tcorrectamente"); + dlg_connect->show(); + return; + } + i++; } - i++; + dlg_connect->set_title("Conexion"); + dlg_label->set_text("Los elementos estan conectados\n\t\tcorrectamente"); + dlg_connect->show(); } }