diff --git a/eeschema/tools/sch_line_wire_bus_tool.cpp b/eeschema/tools/sch_line_wire_bus_tool.cpp index 2c6101f5e0..c5bc98fbca 100644 --- a/eeschema/tools/sch_line_wire_bus_tool.cpp +++ b/eeschema/tools/sch_line_wire_bus_tool.cpp @@ -441,10 +441,8 @@ static void computeBreakPoint( SCH_SCREEN* aScreen, SCH_LINE* aSegment, wxPoint& int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType, SCH_LINE* aSegment ) { - bool forceHV = m_frame->GetForceHVLines(); SCH_SCREEN* screen = m_frame->GetScreen(); EE_POINT_EDITOR* pointEditor = m_toolMgr->GetTool(); - wxPoint cursorPos; m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); getViewControls()->ShowCursor( true ); @@ -454,10 +452,11 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType, // Main loop: keep receiving events while( TOOL_EVENT* evt = Wait() ) { - if( !pointEditor->HasPoint() ) + if( !pointEditor->HasPoint() ) // Set wxCursor shape when starting the tool m_frame->GetCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); - cursorPos = (wxPoint) getViewControls()->GetCursorPosition( !evt->Modifier( MD_ALT ) ); + wxPoint cursorPos = (wxPoint) getViewControls()->GetCursorPosition( !evt->Modifier( MD_ALT ) ); + bool forceHV = m_frame->GetForceHVLines(); //------------------------------------------------------------------------ // Handle cancel: