aboutsummaryrefslogtreecommitdiff
path: root/include/cru
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru')
-rw-r--r--include/cru/ui/components/Component.h5
-rw-r--r--include/cru/ui/controls/Control.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/include/cru/ui/components/Component.h b/include/cru/ui/components/Component.h
index 795d0db0..64c3ef47 100644
--- a/include/cru/ui/components/Component.h
+++ b/include/cru/ui/components/Component.h
@@ -4,9 +4,8 @@
namespace cru::ui::components {
/**
* \brief A component is a composition of controls.
- * \remarks In destructor, component should remove root control from its parent
- * by calling Control::RemoveFromParent. It should respect children's
- * Component::IsDeleteByParent value and decide whether to delete it.
+ * \remarks Component should respect children's Component::IsDeleteByParent
+ * value and decide whether to delete it.
*/
class CRU_UI_API Component : public Object {
public:
diff --git a/include/cru/ui/controls/Control.h b/include/cru/ui/controls/Control.h
index 4dad4549..3293969d 100644
--- a/include/cru/ui/controls/Control.h
+++ b/include/cru/ui/controls/Control.h
@@ -157,6 +157,8 @@ class CRU_UI_API Control : public Object {
host::WindowHost* new_host);
private:
+ bool in_destruction_ = false;
+
Control* parent_ = nullptr;
host::WindowHost* window_host_ = nullptr;