Index: layer.c =================================================================== --- layer.c (revision 21482) +++ layer.c (revision 21483) @@ -655,12 +655,12 @@ } if (new_index == -1 && is_last_top_copper_layer(pcb, old_index)) { - pcb_gui->confirm_dialog("You can't delete the last top-side layer\n", "Ok", NULL); + pcb_hid_message_box("warning", "Layer delete", "You can't delete the last top-side layer\n", "cancel", 0, NULL); return 1; } if (new_index == -1 && is_last_bottom_copper_layer(pcb, old_index)) { - pcb_gui->confirm_dialog("You can't delete the last bottom-side layer\n", "Ok", NULL); + pcb_hid_message_box("warning", "Layer delete", "You can't delete the last bottom-side layer\n", "cancel", 0, NULL); return 1; }