From 9c744b9a21bfbfce15b780c46c4469f6e4083872 Mon Sep 17 00:00:00 2001 From: lisyarus Date: Tue, 17 May 2022 21:27:44 +0300 Subject: [PATCH] Throw if set_child is called for default arrow button --- libs/ui/source/default_element_factory.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/ui/source/default_element_factory.cpp b/libs/ui/source/default_element_factory.cpp index 8571243b..e75c5601 100644 --- a/libs/ui/source/default_element_factory.cpp +++ b/libs/ui/source/default_element_factory.cpp @@ -581,6 +581,11 @@ namespace psemek::ui : direction_{direction} {} + std::shared_ptr set_child(std::shared_ptr) override + { + throw std::runtime_error("default arrow button doesn't support children"); + } + geom::box size_constraints() const override { auto b = button::size_constraints();