Eeschema: do not merge graphical lines with different attributes.

Fixes lp:1821728

https://bugs.launchpad.net/kicad/+bug/1821728

(cherry picked from commit 2447933b54)
This commit is contained in:
Wayne Stambaugh 2019-03-28 13:46:05 -04:00
parent 8a7e501fe6
commit f1a70662c5
1 changed files with 7 additions and 4 deletions

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr * Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr
* Copyright (C) 2004-2016 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2004-2019 KiCad Developers, see change_log.txt for contributors.
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
@ -208,8 +208,8 @@ void SCH_EDIT_FRAME::BeginSegment( int type )
{ {
SCH_LINE* prevSegment = segment->Back(); SCH_LINE* prevSegment = segment->Back();
// Be aware prevSegment can be null when the horizontal and vertical lines only switch is off // Be aware prevSegment can be null when the horizontal and vertical lines only switch
// when we create the first segment. // is off when we create the first segment.
if( !GetForceHVLines() ) if( !GetForceHVLines() )
{ {
@ -618,7 +618,10 @@ bool SCH_EDIT_FRAME::SchematicCleanUp( bool aAppend )
SCH_LINE* line = NULL; SCH_LINE* line = NULL;
bool needed = false; bool needed = false;
if( !secondLine->IsParallel( firstLine ) ) if( !secondLine->IsParallel( firstLine )
|| secondLine->GetLineStyle() != firstLine->GetLineStyle()
|| secondLine->GetLineColor() != firstLine->GetLineColor()
|| secondLine->GetLineSize() != firstLine->GetLineSize() )
continue; continue;
// Remove identical lines // Remove identical lines