Symbol editor: fix crash when trying to "drag" an item.
Drag or move is an option of the schematic editor, and not in symbol editor. So it cannot be tested in code for the symbol editor. Fixes #15264 https://gitlab.com/kicad/code/kicad/-/issues/15264
This commit is contained in:
parent
812c56bdc7
commit
5ea170baab
|
@ -546,7 +546,9 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
// Check if dragging has started within any of selected items bounding box
|
// Check if dragging has started within any of selected items bounding box
|
||||||
if( selectionContains( evt->DragOrigin() ) )
|
if( selectionContains( evt->DragOrigin() ) )
|
||||||
{
|
{
|
||||||
if( m_frame->eeconfig()->m_Input.drag_is_move )
|
// drag_is_move option exists only in schematic editor, not in symbol editor
|
||||||
|
// (m_frame->eeconfig() returns nullptr in Symbol Editor)
|
||||||
|
if( m_isSymbolEditor || m_frame->eeconfig()->m_Input.drag_is_move )
|
||||||
m_toolMgr->RunSynchronousAction( EE_ACTIONS::move, nullptr );
|
m_toolMgr->RunSynchronousAction( EE_ACTIONS::move, nullptr );
|
||||||
else
|
else
|
||||||
m_toolMgr->RunSynchronousAction( EE_ACTIONS::drag, nullptr );
|
m_toolMgr->RunSynchronousAction( EE_ACTIONS::drag, nullptr );
|
||||||
|
|
Loading…
Reference in New Issue