// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
while (node)
{
csCommandState* state = (csCommandState*) node->GetData();
wxShape* shape = state->GetShapeOnCanvas();
wxASSERT( (shape != NULL) );
while (node)
{
csCommandState* state = (csCommandState*) node->GetData();
wxShape* shape = state->GetShapeOnCanvas();
wxASSERT( (shape != NULL) );
{
// Undo in reverse order, so e.g. shapes get added
// back before the lines do.
{
// Undo in reverse order, so e.g. shapes get added
// back before the lines do.
((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, false);
m_shapeOnCanvas->Unlink();
((csDiagramView*) m_doc->GetFirstView())->SelectShape(m_shapeOnCanvas, false);
m_shapeOnCanvas->Unlink();
lineShape->GetFrom()->AddLine(lineShape, lineShape->GetTo(),
lineShape->GetAttachmentFrom(), lineShape->GetAttachmentTo());
lineShape->GetFrom()->AddLine(lineShape, lineShape->GetTo(),
lineShape->GetAttachmentFrom(), lineShape->GetAttachmentTo());