diff --git a/data/pref.xml b/data/pref.xml
index 67be99cb2..078db47ef 100644
--- a/data/pref.xml
+++ b/data/pref.xml
@@ -423,6 +423,9 @@
+
diff --git a/src/app/commands/cmd_new_layer.cpp b/src/app/commands/cmd_new_layer.cpp
index 5bc9644d7..4b845aefc 100644
--- a/src/app/commands/cmd_new_layer.cpp
+++ b/src/app/commands/cmd_new_layer.cpp
@@ -24,6 +24,7 @@
#include "app/i18n/strings.h"
#include "app/load_widget.h"
#include "app/modules/gui.h"
+#include "app/pref/preferences.h"
#include "app/restore_visible_layers.h"
#include "app/tx.h"
#include "app/ui/main_window.h"
@@ -208,6 +209,9 @@ void NewLayerCommand::onExecute(Context* context)
#ifdef ENABLE_UI
// If params specify to ask the user about the name...
if (params().ask() && context->isUIAvailable()) {
+ auto& pref = Preferences::instance();
+ tilesetInfo.baseIndex = pref.tileset.baseIndex();
+
// We open the window to ask the name
app::gen::NewLayer window;
TilesetSelector* tilesetSelector = nullptr;
@@ -227,6 +231,8 @@ void NewLayerCommand::onExecute(Context* context)
if (window.closer() != window.ok())
return;
+ pref.tileset.baseIndex(tilesetSelector->getInfo().baseIndex);
+
name = window.name()->text();
if (tilesetSelector)
tilesetInfo = tilesetSelector->getInfo();