From 3e60aabe7aad4b315a5a081fd4b97bac33cc9efc Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 14 May 2023 22:48:31 +0200 Subject: [PATCH 1/2] Fixed issue #1373 (shapes with user properties are skipped from second input of flat region's '+' operator) --- src/db/db/dbFlatRegion.cc | 2 ++ src/db/unit_tests/dbRegionTests.cc | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/db/db/dbFlatRegion.cc b/src/db/db/dbFlatRegion.cc index e512258b6..db411328b 100644 --- a/src/db/db/dbFlatRegion.cc +++ b/src/db/db/dbFlatRegion.cc @@ -313,6 +313,7 @@ RegionDelegate *FlatRegion::add (const Region &other) const if (other_flat) { new_region->raw_polygons ().insert (other_flat->raw_polygons ().get_layer ().begin (), other_flat->raw_polygons ().get_layer ().end ()); + new_region->raw_polygons ().insert (other_flat->raw_polygons ().get_layer ().begin (), other_flat->raw_polygons ().get_layer ().end ()); } else { @@ -343,6 +344,7 @@ RegionDelegate *FlatRegion::add_in_place (const Region &other) if (other_flat) { polygons.insert (other_flat->raw_polygons ().get_layer ().begin (), other_flat->raw_polygons ().get_layer ().end ()); + polygons.insert (other_flat->raw_polygons ().get_layer ().begin (), other_flat->raw_polygons ().get_layer ().end ()); } else { diff --git a/src/db/unit_tests/dbRegionTests.cc b/src/db/unit_tests/dbRegionTests.cc index d198d9dac..5aff93212 100644 --- a/src/db/unit_tests/dbRegionTests.cc +++ b/src/db/unit_tests/dbRegionTests.cc @@ -2081,6 +2081,24 @@ TEST(50_PropertiesFlat) EXPECT_EQ (s.at_end (), true); } +// "+" operator with properties (issue #1373) +TEST(50b_PropertiesFlat) +{ + db::Region r, rr; + + r.insert (db::Box (0, 0, 10, 20)); + rr.insert (db::Box (0, 0, 100, 200)); + rr.insert (db::BoxWithProperties (db::Box (1, 2, 101, 202), 1)); + + EXPECT_EQ ((db::Region () + rr).to_string (), "(0,0;0,200;100,200;100,0);(1,2;1,202;101,202;101,2)"); + EXPECT_EQ ((rr + db::Region ()).to_string (), "(0,0;0,200;100,200;100,0);(1,2;1,202;101,202;101,2)"); + EXPECT_EQ ((r + rr).to_string (), "(0,0;0,20;10,20;10,0);(0,0;0,200;100,200;100,0);(1,2;1,202;101,202;101,2)"); + + r += rr; + + EXPECT_EQ (r.to_string (), "(0,0;0,20;10,20;10,0);(0,0;0,200;100,200;100,0);(1,2;1,202;101,202;101,2)"); +} + TEST(51_PropertiesFlatFromLayout) { db::Layout ly; From 7784800cbeea5790ad5ffa0715cc0b5a2e6c4065 Mon Sep 17 00:00:00 2001 From: klayoutmatthias Date: Wed, 17 May 2023 18:48:25 +0200 Subject: [PATCH 2/2] OpenSuSE now switched to Qt5, Qt4 no longer supported --- scripts/rpm-data/klayout.spec | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/scripts/rpm-data/klayout.spec b/scripts/rpm-data/klayout.spec index c7024b50c..1ad64705f 100644 --- a/scripts/rpm-data/klayout.spec +++ b/scripts/rpm-data/klayout.spec @@ -85,15 +85,12 @@ Requires: libqt4-x11 >= 4.8.6 # OpenSuSE Leap 15 requirements Requires: ruby >= 2.5 Requires: python3 >= 3.6 -Requires: libqt4-x11 >= 4.8.7 -%define buildopt -j2 -%endif - -%if "%{target_system}" == "opensuse15" -# OpenSuSE Leap 15 requirements -Requires: ruby >= 2.5 -Requires: python3 >= 3.6 -Requires: libqt4-x11 >= 4.8.7 +Requires: libqt5-qtbase >= 5.15.2 +Requires: libQt5PrintSupport5 >= 5.15.2 +Requires: libQt5Designer5 >= 5.15.2 +Requires: libQt5Multimedia5 >= 5.15.2 +Requires: libQt5Svg5 >= 5.15.2 +Requires: libQt5XmlPatterns5 >= 5.15.2 %define buildopt -j2 %endif