From f03152a54834d0df5cdacc0c533a5e522905036d Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 8 May 2021 23:30:38 +0100 Subject: [PATCH] Add some more tools to the "don't allow tool loop interruption" set. See also b78ba127390642935157b51603abb41861eec6ea. Fixes https://gitlab.com/kicad/code/kicad/issues/8071 --- eeschema/tools/sch_drawing_tools.cpp | 24 +++++++++++++++++++---- eeschema/tools/sch_line_wire_bus_tool.cpp | 6 +++++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/eeschema/tools/sch_drawing_tools.cpp b/eeschema/tools/sch_drawing_tools.cpp index c98a3ad9b5..d1de48d3b2 100644 --- a/eeschema/tools/sch_drawing_tools.cpp +++ b/eeschema/tools/sch_drawing_tools.cpp @@ -210,7 +210,11 @@ int SCH_DRAWING_TOOLS::PlaceSymbol( const TOOL_EVENT& aEvent ) } if( symbol ) - cleanup(); + { + m_frame->ShowInfoBarMsg( _( "Press to cancel symbol creation." ) ); + evt->SetPassEvent( false ); + continue; + } if( evt->IsMoveTool() ) { @@ -444,7 +448,11 @@ int SCH_DRAWING_TOOLS::PlaceImage( const TOOL_EVENT& aEvent ) } if( image ) - cleanup(); + { + m_frame->ShowInfoBarMsg( _( "Press to cancel image creation." ) ); + evt->SetPassEvent( false ); + continue; + } if( evt->IsMoveTool() ) { @@ -1062,7 +1070,11 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent ) } if( item ) - cleanup(); + { + m_frame->ShowInfoBarMsg( _( "Press to cancel item creation." ) ); + evt->SetPassEvent( false ); + continue; + } if( evt->IsPointEditor() ) { @@ -1284,7 +1296,11 @@ int SCH_DRAWING_TOOLS::DrawSheet( const TOOL_EVENT& aEvent ) } if( sheet ) - cleanup(); + { + m_frame->ShowInfoBarMsg( _( "Press to cancel sheet creation." ) ); + evt->SetPassEvent( false ); + continue; + } if( evt->IsPointEditor() ) { diff --git a/eeschema/tools/sch_line_wire_bus_tool.cpp b/eeschema/tools/sch_line_wire_bus_tool.cpp index 38a7020218..eff9502f5e 100644 --- a/eeschema/tools/sch_line_wire_bus_tool.cpp +++ b/eeschema/tools/sch_line_wire_bus_tool.cpp @@ -573,7 +573,11 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType, else if( evt->IsActivate() ) { if( segment || m_busUnfold.in_progress ) - cleanup(); + { + m_frame->ShowInfoBarMsg( _( "Press to cancel drawing." ) ); + evt->SetPassEvent( false ); + continue; + } if( evt->IsMoveTool() ) {