From 6d14fa68a496022399d7e7b2efa67f17c6fcfb79 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Artur=20=C5=9Awigo=C5=84?= Date: Thu, 3 Sep 2020 12:21:39 +0200 Subject: [PATCH] [AT-SPI] Make Accessible::GetName() fall back to actor name Change-Id: I9042919ea99759a6b5c0bc60e19e6858ca0c078b --- dali-toolkit/internal/controls/control/control-data-impl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dali-toolkit/internal/controls/control/control-data-impl.cpp b/dali-toolkit/internal/controls/control/control-data-impl.cpp index 3914e6a..4d7c6e4 100755 --- a/dali-toolkit/internal/controls/control/control-data-impl.cpp +++ b/dali-toolkit/internal/controls/control/control-data-impl.cpp @@ -1907,12 +1907,15 @@ std::string Control::Impl::AccessibleImpl::GetName() if (controlImpl.mAccessibilityNameSet) return controlImpl.mAccessibilityName; - return GetNameRaw(); + if (auto raw = GetNameRaw(); !raw.empty()) + return raw; + + return self.GetProperty< std::string >( Actor::Property::NAME ); } std::string Control::Impl::AccessibleImpl::GetNameRaw() { - return self.GetProperty< std::string >( Actor::Property::NAME ); + return {}; } std::string Control::Impl::AccessibleImpl::GetDescription() -- 2.7.4