From 5b1826d2f66b836e73643998cc1d82af125c218f Mon Sep 17 00:00:00 2001 From: Michal Suchanek Date: Sun, 8 Sep 2024 13:54:50 +0200 Subject: [PATCH] label: Add warning for invalid rotate property --- src/ALabel.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ALabel.cpp b/src/ALabel.cpp index ecb1b7ce..3cb2c590 100644 --- a/src/ALabel.cpp +++ b/src/ALabel.cpp @@ -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); }