From 95f2335fc48969f7d7eaaf1bbce7141195f6888a Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 19 Mar 2026 12:53:30 +0100 Subject: [PATCH] [consider merging] bugfix: DeepRegion::processed with properties did not deliver polygon refs which made them unsuitable for further processing. --- src/db/db/dbShapeCollectionUtils.h | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/db/db/dbShapeCollectionUtils.h b/src/db/db/dbShapeCollectionUtils.h index 93e34da9f..c9df9c0ff 100644 --- a/src/db/db/dbShapeCollectionUtils.h +++ b/src/db/db/dbShapeCollectionUtils.h @@ -124,6 +124,27 @@ private: db::Shapes *mp_shapes; }; +/** + * @brief A shape delivery implementation for polygons with properties + */ +template <> +struct DB_PUBLIC shape_collection_processor_delivery +{ + shape_collection_processor_delivery (db::Layout *layout, db::Shapes *shapes) + : mp_layout (layout), mp_shapes (shapes) + { } + + void put (const db::PolygonWithProperties &result) + { + tl::MutexLocker locker (&mp_layout->lock ()); + mp_shapes->insert (db::PolygonRefWithProperties (db::PolygonRef (result, mp_layout->shape_repository ()), result.properties_id ())); + } + +private: + db::Layout *mp_layout; + db::Shapes *mp_shapes; +}; + /** * @brief A shape delivery implementation for texts */ @@ -145,6 +166,27 @@ private: db::Shapes *mp_shapes; }; +/** + * @brief A shape delivery implementation for texts with properties + */ +template <> +struct DB_PUBLIC shape_collection_processor_delivery +{ + shape_collection_processor_delivery (db::Layout *layout, db::Shapes *shapes) + : mp_layout (layout), mp_shapes (shapes) + { } + + void put (const db::TextWithProperties &result) + { + tl::MutexLocker locker (&mp_layout->lock ()); + mp_shapes->insert (db::TextRefWithProperties (db::TextRef (result, mp_layout->shape_repository ()), result.properties_id ())); + } + +private: + db::Layout *mp_layout; + db::Shapes *mp_shapes; +}; + /** * @brief A generic delivery */