@@ -100,6 +100,7 @@ void TestQgsLayoutItemGroup::createGroupDirect()
100100 QVERIFY ( !item->isGroupMember () );
101101 QVERIFY ( !item2->parentGroup () );
102102 QVERIFY ( !item2->isGroupMember () );
103+ QVERIFY ( item->flags () & QGraphicsItem::ItemIsSelectable );
103104
104105 QgsLayoutItemGroup *group = new QgsLayoutItemGroup ( &l );
105106 l.addLayoutItem ( group );
@@ -112,6 +113,7 @@ void TestQgsLayoutItemGroup::createGroupDirect()
112113 group->addItem ( item );
113114 QCOMPARE ( item->parentGroup (), group );
114115 QVERIFY ( item->isGroupMember () );
116+ QVERIFY ( !( item->flags () & QGraphicsItem::ItemIsSelectable ) ); // group items are not selectable
115117 QVERIFY ( !item2->parentGroup () );
116118 QVERIFY ( !item2->isGroupMember () );
117119 QCOMPARE ( group->items ().count (), 1 );
@@ -124,6 +126,7 @@ void TestQgsLayoutItemGroup::createGroupDirect()
124126 QVERIFY ( item->isGroupMember () );
125127 QCOMPARE ( item2->parentGroup (), group );
126128 QVERIFY ( item2->isGroupMember () );
129+ QVERIFY ( !( item2->flags () & QGraphicsItem::ItemIsSelectable ) ); // group items are not selectable
127130 QCOMPARE ( group->items ().count (), 2 );
128131 QVERIFY ( group->items ().contains ( item ) );
129132 QVERIFY ( group->items ().contains ( item2 ) );
@@ -151,6 +154,7 @@ void TestQgsLayoutItemGroup::createGroupDirect()
151154 QVERIFY ( !item2->parentGroup () );
152155 QCOMPARE ( item2->layout (), &l );
153156 QVERIFY ( l.items ().contains ( item2 ) );
157+ QVERIFY ( item2->flags () & QGraphicsItem::ItemIsSelectable ); // should be selectable again
154158}
155159
156160void TestQgsLayoutItemGroup::createGroup ()
0 commit comments