]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Constructor/src/workplace.cpp
Mini bugfix.
[z.facultad/75.42/plaqui.git] / Constructor / src / workplace.cpp
index 6759989b06b0581ab13c4ce6386e5c5ccd495d9b..5ebacf7b579caeda3119a50c6252fa0c108f76cc 100644 (file)
@@ -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<CItem *>::iterator i;
+       i  = listaItems->begin();
+       while ( i != listaItems->end() ) {
+               if ( (*i)->get_name() == _name && (*i)->get_id() != _id )
+                               return true;
+               i++;
+       }
+       return false;
+}