Fix Add Region Map button
This commit is contained in:
parent
83a57c145c
commit
236ad9b73c
1 changed files with 2 additions and 1 deletions
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue