Don't activate measure tool when it's already running.
In this case it's reactivated when the move command ends; only the move command was ended because of activating the measure tool so it gets activated twice. Fixes https://gitlab.com/kicad/code/kicad/issues/6321
This commit is contained in:
parent
ddd026da87
commit
6898dadd1c
|
@ -197,6 +197,9 @@ int PCB_VIEWER_TOOLS::MeasureTool( const TOOL_EVENT& aEvent )
|
||||||
if( IsFootprintFrame() && !frame()->GetModel() )
|
if( IsFootprintFrame() && !frame()->GetModel() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if( frame()->IsCurrentTool( ACTIONS::measureTool ) )
|
||||||
|
return 0;
|
||||||
|
|
||||||
auto& view = *getView();
|
auto& view = *getView();
|
||||||
auto& controls = *getViewControls();
|
auto& controls = *getViewControls();
|
||||||
|
|
||||||
|
@ -221,7 +224,7 @@ int PCB_VIEWER_TOOLS::MeasureTool( const TOOL_EVENT& aEvent )
|
||||||
controls.CaptureCursor( false );
|
controls.CaptureCursor( false );
|
||||||
|
|
||||||
auto setCursor =
|
auto setCursor =
|
||||||
[&]()
|
[&]()
|
||||||
{
|
{
|
||||||
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::MEASURE );
|
frame()->GetCanvas()->SetCurrentCursor( KICURSOR::MEASURE );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue