Make information if tree item is expanded/collapsed persistent

This commit is contained in:
wmayer
2013-04-29 14:30:26 +02:00
parent 7e7dc80a7f
commit a233388328
5 changed files with 104 additions and 49 deletions

View File

@@ -58,7 +58,6 @@ ViewProviderDocumentObject::ViewProviderDocumentObject()
sPixmap = "Feature";
}
ViewProviderDocumentObject::~ViewProviderDocumentObject()
{
// Make sure that the property class does not destruct our string list
@@ -139,12 +138,12 @@ void ViewProviderDocumentObject::attach(App::DocumentObject *pcObj)
// Retrieve the supported display modes of the view provider
aDisplayModesArray = this->getDisplayModes();
if( aDisplayModesArray.empty() )
if (aDisplayModesArray.empty())
aDisplayModesArray.push_back("");
// We must collect the const char* of the strings and give it to PropertyEnumeration,
// but we are still responsible for them, i.e. the property class must not delete the literals.
for ( std::vector<std::string>::iterator it = aDisplayModesArray.begin(); it != aDisplayModesArray.end(); ++it ) {
for (std::vector<std::string>::iterator it = aDisplayModesArray.begin(); it != aDisplayModesArray.end(); ++it) {
aDisplayEnumsArray.push_back( it->c_str() );
}
aDisplayEnumsArray.push_back(0); // null termination