void CObjPropsCanvas::RefreshByRemovingAndAddingAll2(){ ClearProperties(); wxGetApp().m_frame->ClearToolBar(m_toolBar); HeeksObj* marked_object = NULL; if(wxGetApp().m_marked_list->size() == 1) { marked_object = (*wxGetApp().m_marked_list->list().begin()); } if(m_make_initial_properties_in_refresh)ClearInitialProperties(); if(wxGetApp().m_marked_list->size() > 0) { // use the property list too std::list<Property *> list; wxGetApp().m_marked_list->GetProperties(&list); for(std::list<Property*>::iterator It = list.begin(); It != list.end(); It++) { Property* property = *It; if(m_make_initial_properties_in_refresh)m_initial_properties.push_back(property->MakeACopy()); AddProperty(property); } // add toolbar buttons std::list<Tool*> t_list; MarkedObjectOneOfEach mo(0, marked_object, 1, 0, NULL); if (wxGetApp().m_marked_list->size() == 1)mo.GetObject()->GetTools(&t_list, NULL); else wxGetApp().m_marked_list->GetTools(&mo, t_list, NULL, false); for (std::list<Tool*>::iterator It = t_list.begin(); It != t_list.end(); It++) { Tool* tool = *It; if(tool)wxGetApp().m_frame->AddToolBarTool(m_toolBar, tool); } m_toolBar->Realize(); } Resize(); }