libedit: Ensure proper dereference in shared tools
Fixes: lp:1829826 * https://bugs.launchpad.net/kicad/+bug/1829826
This commit is contained in:
parent
b53b29399d
commit
e1373d70ae
|
@ -604,7 +604,13 @@ SELECTION& EE_SELECTION_TOOL::RequestSelection( const KICAD_T aFilterList[] )
|
|||
|
||||
if( m_selection.Size() == 1 )
|
||||
{
|
||||
VECTOR2I refP = ((SCH_ITEM*) m_selection.GetItem( 0 ))->GetPosition();
|
||||
VECTOR2I refP;
|
||||
|
||||
if( m_isLibEdit )
|
||||
refP = static_cast<LIB_ITEM*>( m_selection.GetItem( 0 ) )->GetPosition();
|
||||
else
|
||||
refP = static_cast<SCH_ITEM*>( m_selection.GetItem( 0 ) )->GetPosition();
|
||||
|
||||
m_selection.SetReferencePoint( refP );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue