Misc OGL changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@739 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user