diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index 02a4f99fa8..3c110e1120 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -177,7 +177,7 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent ) break; } } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { if( !component ) { @@ -397,7 +397,7 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) break; } } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { if( !image ) { @@ -901,7 +901,7 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) break; } } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { // First click creates... if( !item ) @@ -1109,7 +1109,7 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent ) break; } } - else if( evt->IsClick( BUT_LEFT ) && !sheet ) + else if( !sheet && ( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) ) { EESCHEMA_SETTINGS* cfg = m_frame->eeconfig(); @@ -1130,6 +1130,7 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent ) m_view->AddToPreview( sheet->Clone() ); } else if( sheet && ( evt->IsClick( BUT_LEFT ) + || evt->IsDblClick( BUT_LEFT ) || evt->IsAction( &EE_ACTIONS::finishSheet ) ) ) { m_view->ClearPreview(); diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 3e7d946241..58eceee41d 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -440,7 +440,9 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) //------------------------------------------------------------------------ // Handle drop // - else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) + else if( evt->IsMouseUp( BUT_LEFT ) + || evt->IsClick( BUT_LEFT ) + || evt->IsDblClick( BUT_LEFT ) ) { break; // Finish } diff --git a/eeschema/tools/symbol_editor_drawing_tools.cpp b/eeschema/tools/symbol_editor_drawing_tools.cpp index e18c144c42..a36f790d8c 100644 --- a/eeschema/tools/symbol_editor_drawing_tools.cpp +++ b/eeschema/tools/symbol_editor_drawing_tools.cpp @@ -151,7 +151,7 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) break; } } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { LIB_PART* part = m_frame->GetCurPart(); @@ -456,7 +456,7 @@ int SYMBOL_EDITOR_DRAWING_TOOLS::PlaceAnchor( const TOOL_EVENT& aEvent ) m_frame->PopTool( tool ); break; } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { LIB_PART* part = m_frame->GetCurPart(); diff --git a/eeschema/tools/symbol_editor_move_tool.cpp b/eeschema/tools/symbol_editor_move_tool.cpp index 68b05cabec..5ed2b0898d 100644 --- a/eeschema/tools/symbol_editor_move_tool.cpp +++ b/eeschema/tools/symbol_editor_move_tool.cpp @@ -103,7 +103,9 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) { m_frame->GetCanvas()->SetCurrentCursor( KICURSOR::MOVING ); - if( evt->IsAction( &EE_ACTIONS::move ) || evt->IsMotion() || evt->IsDrag( BUT_LEFT ) + if( evt->IsAction( &EE_ACTIONS::move ) + || evt->IsMotion() + || evt->IsDrag( BUT_LEFT ) || evt->IsAction( &ACTIONS::refreshPreview ) || evt->IsAction( &EE_ACTIONS::symbolMoveActivate ) ) { @@ -254,7 +256,9 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) //------------------------------------------------------------------------ // Handle drop // - else if( evt->IsMouseUp( BUT_LEFT ) || evt->IsClick( BUT_LEFT ) ) + else if( evt->IsMouseUp( BUT_LEFT ) + || evt->IsClick( BUT_LEFT ) + || evt->IsDblClick( BUT_LEFT ) ) { if( selection.GetSize() == 1 && selection.Front()->Type() == LIB_PIN_T ) { diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp index 2274d0986a..3e8a069b88 100644 --- a/pcbnew/tools/drawing_tool.cpp +++ b/pcbnew/tools/drawing_tool.cpp @@ -1127,7 +1127,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent ) { m_menu.ShowContextMenu( selection() ); } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { // Place the imported drawings for( BOARD_ITEM* item : newItems ) @@ -1189,7 +1189,7 @@ int DRAWING_TOOL::SetAnchor( const TOOL_EVENT& aEvent ) LSET::AllLayersMask() ); m_controls->ForceCursorPosition( true, cursorPos ); - if( evt->IsClick( BUT_LEFT ) ) + if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { FOOTPRINT* footprint = (FOOTPRINT*) m_frame->GetModel(); BOARD_COMMIT commit( m_frame ); @@ -2109,7 +2109,7 @@ int DRAWING_TOOL::DrawVia( const TOOL_EVENT& aEvent ) view->Query( bbox, items ); - for( auto it : items ) + for( std::pair it : items ) { BOARD_ITEM* item = static_cast( it.first ); diff --git a/pcbnew/tools/pcb_tool_base.cpp b/pcbnew/tools/pcb_tool_base.cpp index 48f0f59ac7..267c6e3641 100644 --- a/pcbnew/tools/pcb_tool_base.cpp +++ b/pcbnew/tools/pcb_tool_base.cpp @@ -149,7 +149,7 @@ void PCB_TOOL_BASE::doInteractiveItemPlacement( const std::string& aTool, break; } } - else if( evt->IsClick( BUT_LEFT ) ) + else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) ) { if( !newItem ) {