Fix Add Region Map button

This commit is contained in:
GriffinR 2024-06-11 12:26:34 -04:00
parent 83a57c145c
commit 236ad9b73c

View file

@ -298,7 +298,7 @@ bool RegionMapEditor::buildConfigDialog() {
form.addRow(addMapButton); form.addRow(addMapButton);
// allow user to add region maps // allow user to add region maps
connect(addMapButton, &QPushButton::clicked, [this, regionMapList] { connect(addMapButton, &QPushButton::clicked, [this, regionMapList, &updateJsonFromList] {
poryjson::Json resultJson = configRegionMapDialog(); poryjson::Json resultJson = configRegionMapDialog();
poryjson::Json::object resultObj = resultJson.object_items(); poryjson::Json::object resultObj = resultJson.object_items();
@ -310,6 +310,7 @@ bool RegionMapEditor::buildConfigDialog() {
newItem->setText(resultObj["alias"].string_value()); newItem->setText(resultObj["alias"].string_value());
newItem->setData(Qt::UserRole, resultStr); newItem->setData(Qt::UserRole, resultStr);
regionMapList->addItem(newItem); regionMapList->addItem(newItem);
updateJsonFromList();
}); });
QPushButton *delMapButton = new QPushButton("Delete Selected Region Map"); QPushButton *delMapButton = new QPushButton("Delete Selected Region Map");