From 6b661db95219f2aa5801cbc54a881d33d04b0ed3 Mon Sep 17 00:00:00 2001 From: Phlosioneer Date: Sun, 7 Apr 2019 20:46:53 -0400 Subject: [PATCH] Fix incorrect regex validator This fixes the bug where an empty line wouldn't clear the metatile label. It also removes the '.' and '-' characters. --- src/ui/tileseteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/tileseteditor.cpp b/src/ui/tileseteditor.cpp index 614ce38a..ca6f89ab 100644 --- a/src/ui/tileseteditor.cpp +++ b/src/ui/tileseteditor.cpp @@ -62,7 +62,7 @@ void TilesetEditor::init(Project *project, QString primaryTilesetLabel, QString this->ui->spinBox_paletteSelector->setMaximum(Project::getNumPalettesTotal() - 1); //only allow characters valid for a symbol - QRegExp expression("[-_.A-Za-z0-9]+$"); + QRegExp expression("[_A-Za-z0-9]*$"); QRegExpValidator *validator = new QRegExpValidator(expression); this->ui->lineEdit_metatileLabel->setValidator(validator);