router: feed view size change events to the router engine

This commit is contained in:
Tomasz Wlostowski 2021-02-17 22:01:34 +01:00
parent 12dfb541fc
commit a141ed3444
1 changed files with 6 additions and 0 deletions

View File

@ -539,6 +539,12 @@ void ROUTER_TOOL::saveRouterDebugLog()
void ROUTER_TOOL::handleCommonEvents( TOOL_EVENT& aEvent )
{
if( aEvent.Category() == TC_VIEW || aEvent.Category() == TC_MOUSE )
{
auto viewAreaD = getView()->GetBoundary();
m_router->SetVisibleViewArea( BOX2I( viewAreaD.GetOrigin(), viewAreaD.GetSize() ) );
}
if( !aEvent.IsKeyPressed() )
return;