7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-14 19:39:35 +00:00

Position interactive: don't leave stale ruler after edits

Any non-mouse action, just clear the ruler.
This commit is contained in:
John Beard 2025-01-16 20:21:37 +08:00
parent ba5bdfaca6
commit 040fe379d0

View File

@ -379,6 +379,16 @@ int POSITION_RELATIVE_TOOL::PositionRelativeInteractively( const TOOL_EVENT& aEv
PCB_PICKER_TOOL* picker = m_toolMgr->GetTool<PCB_PICKER_TOOL>();
picker->GetToolMenu().ShowContextMenu( dummy );
}
else if( !evt->IsMouseAction() )
{
// Often this will end up changing the items we just moved, so the ruler will be
// in the wrong place. Clear it away and the user can restart
twoPtMgr.Reset();
view.SetVisible( &ruler, false );
view.Update( &ruler, KIGFX::GEOMETRY );
evt->SetPassEvent();
}
else
{
evt->SetPassEvent();