DRAGGER needs to report it's nets.
Otherwise things like snapping don't work. Fixes https://gitlab.com/kicad/code/kicad/issues/4147
This commit is contained in:
parent
a95e2184da
commit
f6c92ab1ea
|
@ -79,6 +79,11 @@ public:
|
|||
*/
|
||||
NODE* CurrentNode() const override;
|
||||
|
||||
const std::vector<int> CurrentNets() const override
|
||||
{
|
||||
return std::vector<int>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Function Traces()
|
||||
*
|
||||
|
|
|
@ -43,7 +43,8 @@ class DRAG_ALGO : public ALGO_BASE
|
|||
{
|
||||
public:
|
||||
DRAG_ALGO( ROUTER* aRouter ) :
|
||||
ALGO_BASE( aRouter ), m_world( nullptr )
|
||||
ALGO_BASE( aRouter ),
|
||||
m_world( nullptr )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -61,7 +62,6 @@ public:
|
|||
m_world = aWorld;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function Start()
|
||||
*
|
||||
|
@ -95,6 +95,8 @@ public:
|
|||
*/
|
||||
virtual NODE* CurrentNode() const = 0;
|
||||
|
||||
virtual const std::vector<int> CurrentNets() const = 0;
|
||||
|
||||
/**
|
||||
* Function Traces()
|
||||
*
|
||||
|
|
|
@ -83,6 +83,11 @@ public:
|
|||
*/
|
||||
NODE* CurrentNode() const override;
|
||||
|
||||
const std::vector<int> CurrentNets() const override
|
||||
{
|
||||
return std::vector<int>( 1, m_draggedLine.Net() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Function Traces()
|
||||
*
|
||||
|
@ -113,13 +118,10 @@ private:
|
|||
NODE* m_lastNode;
|
||||
int m_mode;
|
||||
LINE m_draggedLine;
|
||||
//VIA* m_draggedVia;
|
||||
//LINE m_lastValidDraggedLine;
|
||||
std::unique_ptr<SHOVE> m_shove;
|
||||
int m_draggedSegmentIndex;
|
||||
bool m_dragStatus;
|
||||
PNS_MODE m_currentMode;
|
||||
ITEM_SET m_origViaConnections;
|
||||
|
||||
///< Contains the list of items that are currently modified by the dragger
|
||||
ITEM_SET m_draggedItems;
|
||||
|
|
|
@ -507,6 +507,8 @@ const std::vector<int> ROUTER::GetCurrentNets() const
|
|||
{
|
||||
if( m_placer )
|
||||
return m_placer->CurrentNets();
|
||||
else if( m_dragger )
|
||||
return m_dragger->CurrentNets();
|
||||
|
||||
return std::vector<int>();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue