Gui: Only promt overwrite message of auto-naming tool when there are actual elements in the layer selector

This commit is contained in:
Mario Hüttel 2019-11-09 02:21:57 +01:00
parent 4e38d8f452
commit d8f6981fe6

View File

@ -758,6 +758,10 @@ static void auto_naming_clicked(GtkWidget *button, gpointer user_data)
gui = RENDERER_GUI(user_data);
/* Don't do anything if the selector is empty. */
if (!layer_selector_contains_elements(gui->layer_selector))
return;
/* Ask for overwrite */
dialog = GTK_DIALOG(gtk_message_dialog_new(gui->main_window, GTK_DIALOG_USE_HEADER_BAR, GTK_MESSAGE_QUESTION,
GTK_BUTTONS_YES_NO, "Overwrite existing layer names?"));