From 511bdb64e12eb9bc9f14e0cc64185b35302251f1 Mon Sep 17 00:00:00 2001 From: Marek Roszko Date: Fri, 9 Oct 2020 18:51:10 -0400 Subject: [PATCH] Fix the delete tool not immediately setting cursor Fix #5939 --- common/tool/picker_tool.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/common/tool/picker_tool.cpp b/common/tool/picker_tool.cpp index 8f8410fe38..bdeec844eb 100644 --- a/common/tool/picker_tool.cpp +++ b/common/tool/picker_tool.cpp @@ -64,9 +64,18 @@ int PICKER_TOOL::Main( const TOOL_EVENT& aEvent ) setControls(); + auto setCursor = + [&]() + { + m_frame->GetCanvas()->SetCurrentCursor( m_cursor ); + }; + + // Set initial cursor + setCursor(); + while( TOOL_EVENT* evt = Wait() ) { - m_frame->GetCanvas()->SetCurrentCursor( m_cursor ); + setCursor(); VECTOR2D cursorPos = controls->GetCursorPosition( m_frame->IsGridVisible() ); if( evt->IsCancelInteractive() || evt->IsActivate() )