We don't always have a line when dragging.
Fixes https://gitlab.com/kicad/code/kicad/issues/12612
This commit is contained in:
parent
ea6fb84351
commit
b2f05c758b
|
@ -266,6 +266,15 @@ void DRAGGER::SetMode( int aMode )
|
|||
}
|
||||
|
||||
|
||||
const std::vector<int> DRAGGER::CurrentNets() const
|
||||
{
|
||||
if( m_mode == PNS::DM_VIA )
|
||||
return std::vector<int>( 1, m_draggedVia.net );
|
||||
else
|
||||
return std::vector<int>( 1, m_draggedLine.Net() );
|
||||
}
|
||||
|
||||
|
||||
bool DRAGGER::dragMarkObstacles( const VECTOR2I& aP )
|
||||
{
|
||||
// fixme: rewrite using shared_ptr...
|
||||
|
|
|
@ -88,10 +88,7 @@ public:
|
|||
*
|
||||
* Returns the net code(s) of currently routed track(s).
|
||||
*/
|
||||
const std::vector<int> CurrentNets() const override
|
||||
{
|
||||
return std::vector<int>( 1, m_draggedLine.Net() );
|
||||
}
|
||||
const std::vector<int> CurrentNets() const override;
|
||||
|
||||
/**
|
||||
* Function CurrentLayer()
|
||||
|
|
Loading…
Reference in New Issue