mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-23 09:06:45 -05:00
handle un-numbered map groups when creating new maps
This commit is contained in:
@@ -53,7 +53,7 @@ void NewMapPopup::setDefaultValues(int groupNum, QString mapSec) {
|
||||
ui->comboBox_NewMap_Secondary_Tileset->addItems(tilesets.value("secondary"));
|
||||
|
||||
ui->comboBox_NewMap_Group->addItems(*project->groupNames);
|
||||
ui->comboBox_NewMap_Group->setCurrentText("gMapGroup" + QString::number(groupNum));
|
||||
ui->comboBox_NewMap_Group->setCurrentText(project->groupNames->at(groupNum));
|
||||
|
||||
if (existingLayout) {
|
||||
ui->spinBox_NewMap_Width->setValue(project->mapLayouts.value(layoutId)->width.toInt(nullptr, 0));
|
||||
@@ -151,7 +151,7 @@ void NewMapPopup::on_pushButton_NewMap_Accept_clicked() {
|
||||
newMap->allowEscapeRope = this->ui->checkBox_NewMap_Allow_Escape_Rope->isChecked() ? "1" : "0";
|
||||
}
|
||||
|
||||
group = this->ui->comboBox_NewMap_Group->currentText().remove("gMapGroup").toInt();
|
||||
group = project->groupNames->indexOf(this->ui->comboBox_NewMap_Group->currentText());
|
||||
newMap->layout = layout;
|
||||
newMap->layoutId = layout->id;
|
||||
project->loadMapLayout(newMap);
|
||||
|
||||
Reference in New Issue
Block a user