]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/samples/ogl/ogledit/view.cpp
remove unfinished sample for release
[wxWidgets.git] / contrib / samples / ogl / ogledit / view.cpp
index f3655f821cc805214914a7d8f7d8fc6129e12cd8..1942b2c8207042193bb566de4fe09b08f2858418 100644 (file)
@@ -176,19 +176,17 @@ bool DiagramView::OnClose(bool WXUNUSED(deleteWindow))
 wxShape *DiagramView::FindSelectedShape(void)
 {
   DiagramDocument *doc = (DiagramDocument *)GetDocument();
 wxShape *DiagramView::FindSelectedShape(void)
 {
   DiagramDocument *doc = (DiagramDocument *)GetDocument();
-  wxShape *theShape = NULL;
   wxObjectList::compatibility_iterator node = doc->GetDiagram()->GetShapeList()->GetFirst();
   while (node)
   {
     wxShape *eachShape = (wxShape *)node->GetData();
     if ((eachShape->GetParent() == NULL) && eachShape->Selected())
     {
   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();
   }
     }
     else node = node->GetNext();
   }
-  return theShape;
+  return NULL;
 }
 
 void DiagramView::OnCut(wxCommandEvent& WXUNUSED(event))
 }
 
 void DiagramView::OnCut(wxCommandEvent& WXUNUSED(event))