Pcb editor: fix crash when trying to activate the "place anchor" tool.
"place anchor" tool exists only in the Fp editor. However, the hotkey to activate this tool was also active in the board editor. Now disabled. From master branch.
This commit is contained in:
parent
9fdc1257a1
commit
f439dfb6ea
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2014-2017 CERN
|
* Copyright (C) 2014-2017 CERN
|
||||||
* Copyright (C) 2018-2021 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2018-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
|
@ -1332,7 +1332,9 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
int DRAWING_TOOL::SetAnchor( const TOOL_EVENT& aEvent )
|
int DRAWING_TOOL::SetAnchor( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
wxASSERT( m_isFootprintEditor );
|
// Make sense only in FP editor
|
||||||
|
if( !m_isFootprintEditor )
|
||||||
|
return 0;
|
||||||
|
|
||||||
if( !m_frame->GetModel() )
|
if( !m_frame->GetModel() )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue