Ensure const-ness matches across draw wire event parameters

This commit is contained in:
Ian McInerney 2023-06-21 14:06:25 +01:00
parent 5d718617a2
commit 19f5c16708
2 changed files with 3 additions and 3 deletions

View File

@ -403,11 +403,11 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
{
DRAW_SEGMENT_EVENT_PARAMS* params = new DRAW_SEGMENT_EVENT_PARAMS();
params->layer = autostart->Parameter<DRAW_SEGMENT_EVENT_PARAMS*>()->layer;
params->layer = autostart->Parameter<const DRAW_SEGMENT_EVENT_PARAMS*>()->layer;
params->quitOnDraw = true;
params->sourceSegment = dynamic_cast<SCH_LINE*>( collector[0] );
autostart->SetParameter( params );
autostart->SetParameter<const DRAW_SEGMENT_EVENT_PARAMS*>( params );
m_toolMgr->ProcessEvent( *autostart );
selCancelled = true;

View File

@ -287,7 +287,7 @@ int SCH_LINE_WIRE_BUS_TOOL::DrawSegments( const TOOL_EVENT& aEvent )
REENTRANCY_GUARD guard( &m_inDrawingTool );
DRAW_SEGMENT_EVENT_PARAMS* params = aEvent.Parameter<DRAW_SEGMENT_EVENT_PARAMS*>();
const DRAW_SEGMENT_EVENT_PARAMS* params = aEvent.Parameter<const DRAW_SEGMENT_EVENT_PARAMS*>();
m_frame->PushTool( aEvent );
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );