Check for dirtied items in the cluster
When drawing the ratsnest, we need to be careful to avoid accessing CONN_ITEMs that have been changed by the underlying model. Checking for dirty items instead of valid items will prevent us looking at data that are out of date Fixes https://gitlab.com/kicad/code/kicad/issues/14265
This commit is contained in:
parent
725834b554
commit
283770fc45
|
@ -292,7 +292,7 @@ void BOARD::UpdateRatsnestExclusions()
|
|||
[&]( CN_EDGE& aEdge )
|
||||
{
|
||||
if( aEdge.GetSourceNode() && aEdge.GetTargetNode()
|
||||
&& aEdge.GetSourceNode()->Valid() && aEdge.GetTargetNode()->Valid() )
|
||||
&& !aEdge.GetSourceNode()->Dirty() && !aEdge.GetTargetNode()->Dirty() )
|
||||
{
|
||||
std::pair<KIID, KIID> ids = { aEdge.GetSourceNode()->Parent()->m_Uuid,
|
||||
aEdge.GetTargetNode()->Parent()->m_Uuid };
|
||||
|
|
|
@ -275,6 +275,12 @@ bool CN_ANCHOR::Valid() const
|
|||
}
|
||||
|
||||
|
||||
bool CN_ANCHOR::Dirty() const
|
||||
{
|
||||
return !Valid() || m_item->Dirty();
|
||||
}
|
||||
|
||||
|
||||
bool CN_ANCHOR::IsDangling() const
|
||||
{
|
||||
int accuracy = 0;
|
||||
|
|
|
@ -72,6 +72,8 @@ public:
|
|||
|
||||
bool Valid() const;
|
||||
|
||||
bool Dirty() const;
|
||||
|
||||
CN_ITEM* Item() const
|
||||
{
|
||||
return m_item;
|
||||
|
|
Loading…
Reference in New Issue