X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/300e400e3a536be2fd747021cd0a8ea2b0dff3dd..a5853e30ca27518a7a3a33e4f97588f7b1e9ffe3:/Constructor/src/workplace.cpp?ds=sidebyside 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; +}