From bc0d94d7a7126e624e07bdd02fbdc2959446c9da Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Fri, 6 Mar 2026 20:15:33 +0100 Subject: [PATCH] RTGroup 2: App: add PropertyListsT::removeIf() (#26173) * App: add PropertyListsT::removeIf() For convenient list value filtering. Co-authored-by: Zheng Lei * Update Property.h * Update Property.h --- src/App/Property.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/App/Property.h b/src/App/Property.h index deae8c02d6..f26194b109 100644 --- a/src/App/Property.h +++ b/src/App/Property.h @@ -1097,6 +1097,16 @@ public: guard.tryInvoke(); } + template F> + int removeIf(F f) { + ListT vals = _lValueList; + size_t removed = std::erase_if(vals, f); + if (removed > 0) { + setValues(std::move(vals)); + } + return static_cast(removed); + } + protected: void setPyValues(const std::vector& vals, const std::vector& indices) override {