Remove unnecessary assignment

This commit is contained in:
GriffinR 2020-12-05 17:47:51 -05:00 committed by huderlem
parent 8261ad5bea
commit 6b6ad558b6

View file

@ -187,7 +187,7 @@ void NewMapPopup::on_pushButton_NewMap_Accept_clicked() {
// If map name is not unique, use default value. Also use only valid characters.
// After stripping invalid characters, strip any leading digits.
QString newMapName = this->ui->lineEdit_NewMap_Name->text().remove(QRegularExpression("[^a-zA-Z0-9_]+"));
newMapName = newMapName.remove(QRegularExpression("^[0-9]*"));
newMapName.remove(QRegularExpression("^[0-9]*"));
if (project->mapNames->contains(newMapName) || newMapName.isEmpty()) {
newMapName = project->getNewMapName();
}