X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6f5f3ca0fef2c0982d9b38483321f9e67ff9f516..23e09f1115536813561fded9bd17ee197cf010c7:/utils/ogl/src/ogldiag.cpp diff --git a/utils/ogl/src/ogldiag.cpp b/utils/ogl/src/ogldiag.cpp index ed50ec51f5..d6c3f3672e 100644 --- a/utils/ogl/src/ogldiag.cpp +++ b/utils/ogl/src/ogldiag.cpp @@ -28,7 +28,7 @@ #include #endif -#if USE_IOSTREAMH +#if wxUSE_IOSTREAMH #include #else #include @@ -300,7 +300,7 @@ bool wxDiagram::LoadFile(const wxString& filename) { wxBeginBusyCursor(); - wxExprDatabase database(PrologInteger, "id"); + wxExprDatabase database(wxExprInteger, "id"); if (!database.Read(filename)) { wxEndBusyCursor(); @@ -578,4 +578,17 @@ void wxDiagram::SetCanvas(wxShapeCanvas *can) m_diagramCanvas = can; } +// 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; +}