X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/300e400e3a536be2fd747021cd0a8ea2b0dff3dd..33a5f978014e65a402a3d376c7e47bd8ee8ab8ab:/Constructor/src/workplace.cpp?ds=inline diff --git a/Constructor/src/workplace.cpp b/Constructor/src/workplace.cpp index 6759989..5ebacf7 100644 --- a/Constructor/src/workplace.cpp +++ b/Constructor/src/workplace.cpp @@ -307,3 +307,16 @@ void WorkPlace::draw_line(int x1, int y1, int x2, int y2, Gdk::Color &color) get_window()->draw_line (gc, x1, y1, x1, y2); get_window()->draw_line (gc, x1, y2, x2, y2); } + + +bool WorkPlace::chek_name(Glib::ustring _name, int _id) +{ + std::list::iterator i; + i = listaItems->begin(); + while ( i != listaItems->end() ) { + if ( (*i)->get_name() == _name && (*i)->get_id() != _id ) + return true; + i++; + } + return false; +}