Pcbnew: Router tool should not block drag selection when idle
The other drawing tools allow drag selection while idle. Also, it makes it more obvious to the user when accidentally drag selecting while routing than just doing nothing on a drag with the routing tool selected and idle.
This commit is contained in:
parent
efab346443
commit
726f9ebe3d
|
@ -1243,6 +1243,12 @@ PNS::PNS_MODE ROUTER_TOOL::GetRouterMode()
|
|||
}
|
||||
|
||||
|
||||
bool ROUTER_TOOL::RoutingInProgress()
|
||||
{
|
||||
return m_router->RoutingInProgress();
|
||||
}
|
||||
|
||||
|
||||
void ROUTER_TOOL::breakTrack()
|
||||
{
|
||||
if( m_startItem && m_startItem->OfKind( PNS::ITEM::SEGMENT_T ) )
|
||||
|
@ -1293,7 +1299,8 @@ int ROUTER_TOOL::MainLoop( const TOOL_EVENT& aEvent )
|
|||
// Main loop: keep receiving events
|
||||
while( TOOL_EVENT* evt = Wait() )
|
||||
{
|
||||
setCursor();
|
||||
if( !evt->IsDrag() )
|
||||
setCursor();
|
||||
|
||||
if( evt->IsCancelInteractive() )
|
||||
{
|
||||
|
|
|
@ -48,6 +48,14 @@ public:
|
|||
|
||||
PNS::PNS_MODE GetRouterMode();
|
||||
|
||||
/**
|
||||
* @brief Returns whether routing is currently active.
|
||||
*
|
||||
* @return True if actively routing, false if not routing or
|
||||
* tool is activated and idle.
|
||||
*/
|
||||
bool RoutingInProgress();
|
||||
|
||||
void setTransitions() override;
|
||||
|
||||
// A filter for narrowing a collection representing a simple corner
|
||||
|
|
|
@ -258,7 +258,7 @@ int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
ROUTER_TOOL* router = m_toolMgr->GetTool<ROUTER_TOOL>();
|
||||
|
||||
// If the router tool is active, don't override
|
||||
if( router && router->IsToolActive() )
|
||||
if( router && router->IsToolActive() && router->RoutingInProgress() )
|
||||
{
|
||||
evt->SetPassEvent();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue