Skip to content

Commit

Permalink
Fix empty generate_crs in building yaml. (#482)
Browse files Browse the repository at this point in the history
Signed-off-by: Charly Wu <[email protected]>
  • Loading branch information
cwrx777 authored Feb 22, 2024
1 parent 500a868 commit 613e8ab
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions rmf_traffic_editor/gui/building_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,16 @@ void BuildingDialog::ok_button_clicked()
_building.reference_level_name =
_reference_floor_combo_box->currentText().toStdString();

_building.params["generate_crs"] =
Param(generate_crs_line_edit->text().toStdString());
if (!generate_crs_line_edit->text().isEmpty())
{
_building.params["generate_crs"] = Param(
generate_crs_line_edit->text().toStdString());
}
else
{
if (_building.params.find("generate_crs") != _building.params.end())
_building.params.erase("generate_crs");
}

accept();
}

0 comments on commit 613e8ab

Please sign in to comment.