diff --git a/forms/tileseteditor.ui b/forms/tileseteditor.ui
index 960142d5..0e8777df 100644
--- a/forms/tileseteditor.ui
+++ b/forms/tileseteditor.ui
@@ -198,19 +198,8 @@
false
- -
-
-
- Metatile Label (Optional)
-
-
-
- -
-
-
- Layer Type
-
-
+
-
+
-
@@ -219,12 +208,24 @@
- -
-
-
- Terrain Type
+
-
+
+
+ -
+
+
+ Qt::Vertical
-
+
+
+ 20
+ 40
+
+
+
+
+ -
+
-
@@ -248,6 +249,13 @@
+ -
+
+
+ Layer Type
+
+
+
-
@@ -255,8 +263,22 @@
- -
-
+
-
+
+
+ Metatile Label (Optional)
+
+
+
+ -
+
+
+ -
+
+
+ Terrain Type
+
+
-
@@ -271,19 +293,6 @@
- -
-
-
- true
-
-
-
- -
-
-
- -
-
-
-
@@ -291,22 +300,33 @@
- -
-
-
- -
-
+
-
+
- Qt::Vertical
+ Qt::Horizontal
- 20
- 40
+ 40
+ 20
+ -
+
+
+ ...
+
+
+
+ -
+
+
+ true
+
+
+
@@ -415,7 +435,7 @@
0
0
384
- 265
+ 262
diff --git a/include/ui/tileseteditor.h b/include/ui/tileseteditor.h
index 1088d27e..832246aa 100644
--- a/include/ui/tileseteditor.h
+++ b/include/ui/tileseteditor.h
@@ -103,6 +103,8 @@ private slots:
void on_actionImport_Secondary_Metatiles_triggered();
+ void on_copyButton_metatileLabel_clicked();
+
private:
void initUi();
void setMetatileBehaviors();
diff --git a/src/ui/tileseteditor.cpp b/src/ui/tileseteditor.cpp
index 540ef66c..e8db7fa5 100644
--- a/src/ui/tileseteditor.cpp
+++ b/src/ui/tileseteditor.cpp
@@ -1046,3 +1046,14 @@ void TilesetEditor::countTileUsage() {
}
}
}
+
+void TilesetEditor::on_copyButton_metatileLabel_clicked() {
+ QClipboard * clipboard = QGuiApplication::clipboard();
+ QString label = this->ui->lineEdit_metatileLabel->text();
+ if (!label.isEmpty()) {
+ Tileset * tileset = Tileset::getMetatileTileset(this->getSelectedMetatile(), this->primaryTileset, this->secondaryTileset);
+ if (tileset)
+ label.prepend("METATILE_" + QString(tileset->name).replace("gTileset_", "") + "_");
+ }
+ clipboard->setText(label);
+}