KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_issue24335_group_move_ancestor.cpp File Reference

Test for issue #24335: Moving of grouped components breaks wire positions. More...

#include <boost/test/unit_test.hpp>
#include <eda_item.h>
#include <sch_field.h>
#include <sch_group.h>
#include <sch_line.h>
#include <sch_screen.h>
#include <sch_symbol.h>
#include <schematic.h>
#include <settings/settings_manager.h>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <wx/filename.h>
#include <wx/stdpaths.h>

Go to the source code of this file.

Classes

struct  GROUP_MOVE_ANCESTOR_FIXTURE
 

Functions

 BOOST_AUTO_TEST_CASE (SymbolInsideSelectedGroupReportsAncestor)
 
 BOOST_AUTO_TEST_CASE (NestedGroupAncestorIsDetected)
 
 BOOST_AUTO_TEST_CASE (SymbolFieldInheritsAncestorGroupViaParent)
 
 BOOST_AUTO_TEST_CASE (WireInsideSelectedGroupReportsAncestor)
 

Detailed Description

Test for issue #24335: Moving of grouped components breaks wire positions.

Root cause: getConnectedDragItems() in sch_move_tool.cpp used a plain IsSelected() check on candidate items to decide whether to skip them. Items that move as members of a selected group do not carry the SELECTED flag themselves, so they were treated as fixed anchors. When an outside wire endpoint touched a symbol pin belonging to such a group member, a spurious stub wire was synthesised at the group boundary, producing the broken diagonal wires observed in the report.

The fix introduces EDA_ITEM::HasSelectedAncestorGroup() which walks the parent-group chain and returns true if any ancestor group is selected. This test exercises that helper for the scenarios used inside getConnectedDragItems.

Definition in file test_issue24335_group_move_ancestor.cpp.

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/4]

◆ BOOST_AUTO_TEST_CASE() [2/4]

◆ BOOST_AUTO_TEST_CASE() [3/4]

BOOST_AUTO_TEST_CASE ( SymbolInsideSelectedGroupReportsAncestor )

◆ BOOST_AUTO_TEST_CASE() [4/4]

BOOST_AUTO_TEST_CASE ( WireInsideSelectedGroupReportsAncestor )