+// Find a shape by its id
+wxShape* wxDiagram::FindShape(long id) const
+{
+ wxNode* node = GetShapeList()->First();
+ while (node)
+ {
+ wxShape* shape = (wxShape*) node->Data();
+ if (shape->GetId() == id)
+ return shape;
+ node = node->Next();
+ }
+ return NULL;
+}