aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/components/Component.h
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-11-16 17:48:39 +0800
committerYuqian Yang <crupest@crupest.life>2025-11-16 17:48:39 +0800
commitb68f9f52a3ecdd8e379dd60ac1c1366e76695464 (patch)
tree3b863e4f68ffcc0e8556b68ae3176043393f558e /include/cru/ui/components/Component.h
parent1ce8866e5b88da6cc4b7cd4d3440f7d70c7be5db (diff)
downloadcru-b68f9f52a3ecdd8e379dd60ac1c1366e76695464.tar.gz
cru-b68f9f52a3ecdd8e379dd60ac1c1366e76695464.tar.bz2
cru-b68f9f52a3ecdd8e379dd60ac1c1366e76695464.zip
Fix delete later related things.
Diffstat (limited to 'include/cru/ui/components/Component.h')
-rw-r--r--include/cru/ui/components/Component.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/cru/ui/components/Component.h b/include/cru/ui/components/Component.h
index 627e2d3c..6d31ae79 100644
--- a/include/cru/ui/components/Component.h
+++ b/include/cru/ui/components/Component.h
@@ -19,9 +19,7 @@ class CRU_UI_API Component : public Object, public DeleteLaterImpl {
void SetDeleteByParent(bool delete_by_parent) {
delete_by_parent_ = delete_by_parent;
}
- void DeleteIfDeleteByParent() const {
- if (delete_by_parent_) delete this;
- }
+ void DeleteIfDeleteByParent(bool delete_later = true);
protected:
void OnPrepareDelete() override;