Gui: Only promt overwrite message of auto-naming tool when there are actual elements in the layer selector
This commit is contained in:
parent
4e38d8f452
commit
d8f6981fe6
@ -758,6 +758,10 @@ static void auto_naming_clicked(GtkWidget *button, gpointer user_data)
|
|||||||
|
|
||||||
gui = RENDERER_GUI(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 */
|
/* Ask for overwrite */
|
||||||
dialog = GTK_DIALOG(gtk_message_dialog_new(gui->main_window, GTK_DIALOG_USE_HEADER_BAR, GTK_MESSAGE_QUESTION,
|
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?"));
|
GTK_BUTTONS_YES_NO, "Overwrite existing layer names?"));
|
||||||
|
Loading…
Reference in New Issue
Block a user