empty map name check, increase max dimensions
This commit is contained in:
parent
d4d15d17be
commit
be44e4b918
2 changed files with 11 additions and 3 deletions
|
@ -61,7 +61,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_NewMap_Width"/>
|
||||
<widget class="QSpinBox" name="spinBox_NewMap_Width">
|
||||
<property name="maximum">
|
||||
<number>200</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_NewMap_Height">
|
||||
|
@ -71,7 +75,11 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QSpinBox" name="spinBox_NewMap_Height"/>
|
||||
<widget class="QSpinBox" name="spinBox_NewMap_Height">
|
||||
<property name="maximum">
|
||||
<number>200</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_NewMap_Primary_Tileset">
|
||||
|
|
|
@ -63,7 +63,7 @@ void NewMapPopup::on_pushButton_NewMap_Accept_clicked() {
|
|||
|
||||
// If map name is not unique, use default value. Also replace spaces with underscores.
|
||||
QString newMapName = this->ui->lineEdit_NewMap_Name->text().replace(" ","_");
|
||||
if (project->mapNames->contains(newMapName)) {
|
||||
if (project->mapNames->contains(newMapName) || newMapName.isEmpty()) {
|
||||
newMapName = project->getNewMapName();
|
||||
}
|
||||
newMap->name = newMapName;
|
||||
|
|
Loading…
Reference in a new issue