label: Add warning for invalid rotate property

This commit is contained in:
Michal Suchanek 2024-09-08 13:54:50 +02:00
parent 1fa8019ad5
commit 5b1826d2f6
1 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,8 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st
if (config_["rotate"].isUInt()) {
rotate = config["rotate"].asUInt();
if (not (rotate == 0 || rotate == 90 || rotate == 180 || rotate == 270))
spdlog::warn("'rotate' is only supported in 90 degree increments {} is not valid.", rotate);
label_.set_angle(rotate);
}