Don't crash on highight net during drag.

Fixes https://gitlab.com/kicad/code/kicad/issues/10866
This commit is contained in:
Jeff Young 2022-02-21 12:25:22 +00:00
parent a5305aa235
commit b4ac59d9d3
3 changed files with 9 additions and 1 deletions

View File

@ -140,7 +140,7 @@ SCH_CONNECTION* SCH_ITEM::Connection( const SCH_SHEET_PATH* aSheet ) const
if( !IsConnectable() )
return nullptr;
wxASSERT_MSG( !IsConnectivityDirty(),
wxCHECK_MSG( !IsConnectivityDirty(), nullptr,
wxT( "Shouldn't be asking for connection if connectivity is dirty!" ) );
if( !aSheet )

View File

@ -757,6 +757,9 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType,
segment = doUnfoldBus( net, contextMenuPos );
}
}
//------------------------------------------------------------------------
// Handle TOOL_ACTION special cases
//
else if( evt->IsAction( &EE_ACTIONS::rotateCW ) || evt->IsAction( &EE_ACTIONS::rotateCCW ) )
{
if( m_busUnfold.in_progress )

View File

@ -446,6 +446,11 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
}
}
}
else if( evt->IsAction( &EE_ACTIONS::highlightNet )
|| evt->IsAction( &EE_ACTIONS::explicitCrossProbe ) )
{
// These don't make any sense during a move. Eat them.
}
//------------------------------------------------------------------------
// Handle context menu
//