Fix sheet pin import after SelectPoint API change

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4552
This commit is contained in:
Jon Evans 2020-05-27 11:18:12 -04:00
parent 9817b63f66
commit 1792479ca5
2 changed files with 9 additions and 4 deletions

View File

@ -541,12 +541,12 @@ bool EE_SELECTION_TOOL::SelectPoint( const VECTOR2I& aWhere, const KICAD_T* aFil
if( aSubtract || ( aExclusiveOr && collector[i]->IsSelected() ) ) if( aSubtract || ( aExclusiveOr && collector[i]->IsSelected() ) )
{ {
unselect( collector[i] ); unselect( collector[i] );
anySubtracted = false; anySubtracted = true;
} }
else else
{ {
select( collector[i] ); select( collector[i] );
anySubtracted = true; anyAdded = true;
} }
} }
} }

View File

@ -816,8 +816,13 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
case SCH_SHEET_PIN_T: case SCH_SHEET_PIN_T:
{ {
SCH_HIERLABEL* label = nullptr; SCH_HIERLABEL* label = nullptr;
SCH_SHEET* sheet = (SCH_SHEET*) m_selectionTool->SelectPoint( cursorPos, SCH_SHEET* sheet = nullptr;
EE_COLLECTOR::SheetsOnly );
if( m_selectionTool->SelectPoint( cursorPos, EE_COLLECTOR::SheetsOnly, &item ) )
sheet = dynamic_cast<SCH_SHEET*>( item );
item = nullptr;
if( !sheet ) if( !sheet )
{ {
m_statusPopup.reset( new STATUS_TEXT_POPUP( m_frame ) ); m_statusPopup.reset( new STATUS_TEXT_POPUP( m_frame ) );