Commit 4ca2072a authored by charras's avatar charras

eeschema crashes when delete a sheet label (pin sheet), undo this and move the label

parent 0f54a686
......@@ -9,6 +9,9 @@ email address.
================================================================================
+eeschema
Solved: eeschema crashes when create a new sheet, using the default filename and enter it.
Solved: eeschema crashes when delete a sheet label (pin sheet), undo this and move the label.
(bad value (not updated) for the DrawSheetLabelStruct.m_Parent member after redo command in sheet edit).
+all:
Added comments in gestfich.cpp to explain the default paths used by kicad to find help files and lib files
......
......@@ -105,7 +105,7 @@ DrawSheetStruct* DrawSheetStruct::GenCopy()
{
Slabel = newitem->m_Label = label->GenCopy();
Slabel->m_Parent = newitem;
label = (DrawSheetLabelStruct*) label->Pnext;
label = label->Next();
}
while( label )
......@@ -113,7 +113,7 @@ DrawSheetStruct* DrawSheetStruct::GenCopy()
Slabel->Pnext = label->GenCopy();
Slabel = (DrawSheetLabelStruct*) Slabel->Pnext;
Slabel->m_Parent = newitem;
label = (DrawSheetLabelStruct*) label->Pnext;
label = label->Next();
}
/* don't copy screen data - just reference it. */
......@@ -140,6 +140,21 @@ void DrawSheetStruct::SwapData( DrawSheetStruct* copyitem )
EXCHG( m_FileNameSize, copyitem->m_FileNameSize );
EXCHG( m_Label, copyitem->m_Label );
EXCHG( m_NbLabel, copyitem->m_NbLabel );
// Ensure sheet labels have their .m_Parent member poiuntin really on their parent, after swapping.
DrawSheetLabelStruct * label = m_Label;
while( label )
{
label->m_Parent = this;
label = label->Next();
}
label = copyitem->m_Label;
while( label )
{
label->m_Parent = copyitem;
label = label->Next();
}
}
......
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