Index: trunk/src_plugins/hid_gtk/gui-config.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-config.c (revision 2293) +++ trunk/src_plugins/hid_gtk/gui-config.c (revision 2294) @@ -1317,13 +1317,32 @@ void config_layers_save(GtkButton *widget, save_ctx_t *ctx) { gchar *s; + int n; const char *paths[] = { "design/groups", + "design/default_layer_name", NULL }; + config_layers_apply(); s = make_layer_group_string(&PCB->LayerGroups); + + /* change default layer names to the current ones in dest */ + for (n = 0; n < max_copper_layer; n++) { + LayerType *layer; + char lnp[128]; + lht_node_t *nd; + sprintf(lnp, "design/default_layer_name[%d]", n); + nd = conf_lht_get_at(ctx->dst_role, lnp, 1); + layer = &PCB->Data->Layer[n]; + if (strcmp(layer->Name, nd->data.text.value) != 0) { + free(nd->data.text.value); + nd->data.text.value = strdup(layer->Name); + conf_makedirty(ctx->dst_role); + } + } + conf_update("design/default_layer_name"); conf_set(CFR_DESIGN, "design/groups", -1, s, POL_OVERWRITE); g_free(s); config_any_replace(ctx, paths);