fix some map combos not being populated with new items

This commit is contained in:
garak 2024-04-19 18:57:27 -04:00
parent 34478e69d9
commit bc454d6b13

View file

@ -1617,6 +1617,8 @@ void MainWindow::onNewMapCreated() {
editor->project->saveMap(newMap);
editor->project->saveAllDataStructures();
loadProjectCombos(); // need to maybe repopulate layout combo
// Add new Map / Layout to the mapList models
this->mapGroupModel->insertMapItem(newMapName, editor->project->groupNames[newMapGroup]);
this->mapAreaModel->insertMapItem(newMapName, newMap->location, newMapGroup);
@ -1760,6 +1762,8 @@ void MainWindow::on_actionNew_Tileset_triggered() {
}
insertTilesetLabel(&editor->project->tilesetLabelsOrdered, createTilesetDialog->fullSymbolName);
loadProjectCombos(); // need to reload tileset combos
QMessageBox msgBox(this);
msgBox.setText("Successfully created tileset.");
QString message = QString("Tileset \"%1\" was created successfully.").arg(createTilesetDialog->friendlyName);