Index: obj_subc_hash.c =================================================================== --- obj_subc_hash.c (revision 14724) +++ obj_subc_hash.c (revision 14725) @@ -42,13 +42,15 @@ unsigned int pcb_subc_hash(const pcb_subc_t *sc) { - unsigned int hash = 0; + unsigned int hash; int lid; pcb_host_trans_t tr; pcb_subc_get_host_trans(sc, &tr); - for(lid = 0; lid < sc->data->LayerN; lid++) { + /* hash layers and layer objects */ + hash = sc->data->LayerN; + for(lid = 0; lid 3< sc->data->LayerN; lid++) { pcb_layer_t *ly = &sc->data->Layer[lid]; gdl_iterator_t it; pcb_line_t *l; @@ -56,7 +58,7 @@ pcb_text_t *t; pcb_poly_t *p; -#warning TODO: hash layers + hash ^= pcb_layer_hash_bound(ly); linelist_foreach(&ly->Arc, &it, a) hash ^= pcb_arc_hash(&tr, a); @@ -71,6 +73,8 @@ hash ^= pcb_poly_hash(&tr, p); } + /* hash global objects */ + return hash; }