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 d9d23dd06b
commit a2772b3363
3 changed files with 10 additions and 2 deletions

View File

@ -141,8 +141,8 @@ SCH_CONNECTION* SCH_ITEM::Connection( const SCH_SHEET_PATH* aSheet ) const
if( !IsConnectable() )
return nullptr;
wxASSERT_MSG( !IsConnectivityDirty(),
"Shouldn't be asking for connection if connectivity is dirty!" );
wxCHECK_MSG( !IsConnectivityDirty(), nullptr,
wxT( "Shouldn't be asking for connection if connectivity is dirty!" ) );
if( !aSheet )
aSheet = &Schematic()->CurrentSheet();

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

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