Merge pull request #134 from garakmon/map-grp-num
Create New Maps In Correct Group When Group Names Are Not Numbered
This commit is contained in:
commit
ca438fdc50
1 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ void NewMapPopup::setDefaultValues(int groupNum, QString mapSec) {
|
||||||
ui->comboBox_NewMap_Secondary_Tileset->addItems(tilesets.value("secondary"));
|
ui->comboBox_NewMap_Secondary_Tileset->addItems(tilesets.value("secondary"));
|
||||||
|
|
||||||
ui->comboBox_NewMap_Group->addItems(*project->groupNames);
|
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) {
|
if (existingLayout) {
|
||||||
ui->spinBox_NewMap_Width->setValue(project->mapLayouts.value(layoutId)->width.toInt(nullptr, 0));
|
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";
|
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->layout = layout;
|
||||||
newMap->layoutId = layout->id;
|
newMap->layoutId = layout->id;
|
||||||
project->loadMapLayout(newMap);
|
project->loadMapLayout(newMap);
|
||||||
|
|
Loading…
Reference in a new issue