Commit 38a08f1f authored by dickelbeck's avatar dickelbeck

delete hierarhical pin sheet bug

parent 4715ea28
...@@ -273,7 +273,7 @@ bool DrawMarkerStruct::Save( FILE* aFile ) const ...@@ -273,7 +273,7 @@ bool DrawMarkerStruct::Save( FILE* aFile ) const
wxString msg; wxString msg;
if( fprintf( aFile, "Kmarq %c %-4d %-4d \"%s\" F=%X\n", if( fprintf( aFile, "Kmarq %c %-4d %-4d \"%s\" F=%X\n",
m_Type + 'A', int( m_Type ) + 'A',
m_Pos.x, m_Pos.y, m_Pos.x, m_Pos.y,
CONV_TO_UTF8( m_Comment ), m_MarkFlags ) == EOF ) CONV_TO_UTF8( m_Comment ), m_MarkFlags ) == EOF )
{ {
......
...@@ -33,13 +33,14 @@ ...@@ -33,13 +33,14 @@
#define BUS_TO_BUS 1 #define BUS_TO_BUS 1
typedef enum { /* Type des Marqueurs */ enum TypeMarker { /* Type des Marqueurs */
MARQ_UNSPEC, MARQ_UNSPEC,
MARQ_ERC, MARQ_ERC,
MARQ_PCB, MARQ_PCB,
MARQ_SIMUL, MARQ_SIMUL,
MARQ_NMAX /* Derniere valeur: fin de tableau */ MARQ_NMAX /* Derniere valeur: fin de tableau */
} TypeMarker; };
/* Messages correspondants aux types des marqueurs */ /* Messages correspondants aux types des marqueurs */
#ifdef MAIN #ifdef MAIN
......
...@@ -433,20 +433,20 @@ void WinEDA_SchematicFrame::DeleteSheetLabel( wxDC* DC, ...@@ -433,20 +433,20 @@ void WinEDA_SchematicFrame::DeleteSheetLabel( wxDC* DC,
std::cout << "\n\n\n" << std::flush; std::cout << "\n\n\n" << std::flush;
#endif #endif
Hierarchical_PIN_Sheet_Struct* label = parent->m_Label; Hierarchical_PIN_Sheet_Struct* prev = NULL;
Hierarchical_PIN_Sheet_Struct** pprev = &parent->m_Label; Hierarchical_PIN_Sheet_Struct* label = parent->m_Label;
for( ; label; prev=label, label=label->Next() )
while( label )
{ {
if( label == SheetLabelToDel ) if( label == SheetLabelToDel )
{ {
*pprev = label->Next(); if( prev )
prev->Pnext = label->Next();
else
parent->m_Label = label->Next();
break; break;
} }
pprev = (Hierarchical_PIN_Sheet_Struct**) &label->Pnext;
label = label->Next();
} }
delete SheetLabelToDel; delete SheetLabelToDel;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment