delete hierarhical pin sheet bug
This commit is contained in:
parent
4715ea28e2
commit
38a08f1ffc
|
@ -273,7 +273,7 @@ bool DrawMarkerStruct::Save( FILE* aFile ) const
|
|||
wxString msg;
|
||||
|
||||
if( fprintf( aFile, "Kmarq %c %-4d %-4d \"%s\" F=%X\n",
|
||||
m_Type + 'A',
|
||||
int( m_Type ) + 'A',
|
||||
m_Pos.x, m_Pos.y,
|
||||
CONV_TO_UTF8( m_Comment ), m_MarkFlags ) == EOF )
|
||||
{
|
||||
|
|
|
@ -33,13 +33,14 @@
|
|||
#define BUS_TO_BUS 1
|
||||
|
||||
|
||||
typedef enum { /* Type des Marqueurs */
|
||||
enum TypeMarker { /* Type des Marqueurs */
|
||||
MARQ_UNSPEC,
|
||||
MARQ_ERC,
|
||||
MARQ_PCB,
|
||||
MARQ_SIMUL,
|
||||
MARQ_NMAX /* Derniere valeur: fin de tableau */
|
||||
} TypeMarker;
|
||||
};
|
||||
|
||||
|
||||
/* Messages correspondants aux types des marqueurs */
|
||||
#ifdef MAIN
|
||||
|
|
|
@ -433,20 +433,20 @@ void WinEDA_SchematicFrame::DeleteSheetLabel( wxDC* DC,
|
|||
std::cout << "\n\n\n" << std::flush;
|
||||
#endif
|
||||
|
||||
Hierarchical_PIN_Sheet_Struct* prev = NULL;
|
||||
|
||||
Hierarchical_PIN_Sheet_Struct* label = parent->m_Label;
|
||||
|
||||
Hierarchical_PIN_Sheet_Struct** pprev = &parent->m_Label;
|
||||
|
||||
while( label )
|
||||
for( ; label; prev=label, label=label->Next() )
|
||||
{
|
||||
if( label == SheetLabelToDel )
|
||||
{
|
||||
*pprev = label->Next();
|
||||
if( prev )
|
||||
prev->Pnext = label->Next();
|
||||
else
|
||||
parent->m_Label = label->Next();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
pprev = (Hierarchical_PIN_Sheet_Struct**) &label->Pnext;
|
||||
label = label->Next();
|
||||
}
|
||||
|
||||
delete SheetLabelToDel;
|
||||
|
|
Loading…
Reference in New Issue