From 6dc85d1c96f212eaa124171394c15a5719e28034 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 16 Mar 2012 20:08:57 +0100 Subject: [PATCH] Eeschema: fix bug Bug #956818 --- eeschema/bus-wire-junction.cpp | 14 ++++++++++++++ include/pcbcommon.h | 4 ---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index a81042526e..25d5c0f2e4 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -107,7 +107,21 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type ) SCH_LINE* nextSegment; wxPoint cursorpos = GetScreen()->GetCrossHairPosition(); + // We should know id a segment is currently in progress segment = (SCH_LINE*) GetScreen()->GetCurItem(); + if( segment ) // a current item exists, but not necessary a currently edited item + { + if( !segment->GetFlags() || ( segment->Type() != SCH_LINE_T ) ) + { + if( segment->GetFlags() ) + { + wxLogDebug( wxT( "BeginSegment: item->GetFlags()== %X" ), + segment->GetFlags() ); + } + // no wire, bus or graphic line in progress + segment = NULL; + } + } if( !segment ) /* first point : Create first wire or bus */ { diff --git a/include/pcbcommon.h b/include/pcbcommon.h index 1fc354e525..4e7d1f7882 100644 --- a/include/pcbcommon.h +++ b/include/pcbcommon.h @@ -9,14 +9,10 @@ #include #include // LAYER_COUNT and NB_COPPER_LAYERS definitions. -//#include // wxString class. -//#include // wxArrayString class. - #define MIN_DRAW_WIDTH 1 ///< Minimum trace drawing width. -//class PCB_SCREEN; class D_PAD; class TRACK; class BOARD;