diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-11-16 12:14:47 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-11-16 12:14:47 +0800 |
| commit | faf73c4af74bdae1abf394a33b573149b98ec2b1 (patch) | |
| tree | aa985593c35a256e7190eddf47e023962a717ade /src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp | |
| parent | 4e0b7d82cd64ef8016dcb49247a8a5e4de8a0b3d (diff) | |
| download | cru-faf73c4af74bdae1abf394a33b573149b98ec2b1.tar.gz cru-faf73c4af74bdae1abf394a33b573149b98ec2b1.tar.bz2 cru-faf73c4af74bdae1abf394a33b573149b98ec2b1.zip | |
Clean DeleteLater.
Diffstat (limited to 'src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp')
| -rw-r--r-- | src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp b/src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp index d01ceca0..b9b1fdef 100644 --- a/src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp +++ b/src/ThemeBuilder/components/conditions/CompoundConditionEditor.cpp @@ -7,6 +7,7 @@ #include "cru/base/ClonePtr.h" #include "cru/platform/Color.h" #include "cru/ui/Base.h" +#include "cru/ui/DeleteLater.h" #include "cru/ui/ThemeManager.h" #include "cru/ui/controls/FlexLayout.h" #include "cru/ui/style/Condition.h" @@ -67,7 +68,7 @@ CompoundConditionEditor::CompoundConditionEditor() { this->children_container_.RemoveChildAt(index); RaiseChangeEvent(); }); - children_.push_back(std::move(editor)); + children_.push_back(ui::ToDeleteLaterPtr(std::move(editor))); children_container_.AddChild(children_.back()->GetRootControl()); RaiseChangeEvent(); } @@ -86,8 +87,7 @@ CompoundConditionEditor::GetChildren() { } void CompoundConditionEditor::SetChildren( - std::vector<ClonePtr<ui::style::Condition>> children, - bool trigger_change) { + std::vector<ClonePtr<ui::style::Condition>> children, bool trigger_change) { children_container_.ClearChildren(); children_.clear(); for (const auto& condition : children) { @@ -99,7 +99,7 @@ void CompoundConditionEditor::SetChildren( this->children_container_.RemoveChildAt(index); RaiseChangeEvent(); }); - children_.push_back(std::move(editor)); + children_.push_back(ui::ToDeleteLaterPtr(std::move(editor))); children_container_.AddChild(children_.back()->GetRootControl()); } if (trigger_change) { |
