if (diagram_p->GetShapeList())
{
/* wxCursor *old_cursor = NULL; */
- wxNode *current = diagram_p->GetShapeList()->GetFirst();
+ wxObjectList::compatibility_iterator current = diagram_p->GetShapeList()->GetFirst();
while (current) // Loop through the entire list of shapes
{
wxShape *DiagramView::FindSelectedShape(void)
{
DiagramDocument *doc = (DiagramDocument *)GetDocument();
- wxShape *theShape = NULL;
- wxNode *node = doc->GetDiagram()->GetShapeList()->GetFirst();
+ wxObjectList::compatibility_iterator node = doc->GetDiagram()->GetShapeList()->GetFirst();
while (node)
{
wxShape *eachShape = (wxShape *)node->GetData();
if ((eachShape->GetParent() == NULL) && eachShape->Selected())
{
- theShape = eachShape;
- node = NULL;
+ return eachShape;
}
else node = node->GetNext();
}
- return theShape;
+ return NULL;
}
void DiagramView::OnCut(wxCommandEvent& WXUNUSED(event))