Eeschema - restrict buses and wires to H and V orientation was taken in account only when activating the Create Bus or Wire tool.

Now taken in account during creation.

Fixes: lp:1837308
https://bugs.launchpad.net/kicad/+bug/1837308
This commit is contained in:
jean-pierre charras 2019-07-21 10:02:43 +02:00
parent 4d4adf0753
commit de4854d112
1 changed files with 3 additions and 4 deletions

View File

@ -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 ) 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(); SCH_SCREEN* screen = m_frame->GetScreen();
EE_POINT_EDITOR* pointEditor = m_toolMgr->GetTool<EE_POINT_EDITOR>(); EE_POINT_EDITOR* pointEditor = m_toolMgr->GetTool<EE_POINT_EDITOR>();
wxPoint cursorPos;
m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true ); m_toolMgr->RunAction( EE_ACTIONS::clearSelection, true );
getViewControls()->ShowCursor( 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 // Main loop: keep receiving events
while( TOOL_EVENT* evt = Wait() ) while( TOOL_EVENT* evt = Wait() )
{ {
if( !pointEditor->HasPoint() ) if( !pointEditor->HasPoint() ) // Set wxCursor shape when starting the tool
m_frame->GetCanvas()->SetCurrentCursor( wxCURSOR_PENCIL ); 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: // Handle cancel: