add comment

This commit is contained in:
wmayer
2018-12-27 20:06:16 +01:00
parent 4276b92e32
commit 5d36da83e0

View File

@@ -242,24 +242,32 @@ std::vector<std::string> ViewProviderPoints::getDisplayModes(void) const
{
std::vector<std::string> StrList;
StrList.push_back("Points");
// FIXME: This way all display modes are added even if the points feature
// doesn't support it.
// For the future a more flexible way is needed to add new display modes
// at a later time
#if 1
StrList.push_back("Color");
StrList.push_back("Shaded");
StrList.push_back("Intensity");
// if (pcObject) {
// std::map<std::string,App::Property*> Map;
// pcObject->getPropertyMap(Map);
#else
if (pcObject) {
std::map<std::string,App::Property*> Map;
pcObject->getPropertyMap(Map);
// for (std::map<std::string,App::Property*>::iterator it = Map.begin(); it != Map.end(); ++it) {
// Base::Type type = it->second->getTypeId();
// if (type == Points::PropertyNormalList::getClassTypeId())
//~ StrList.push_back("Shaded");
// else if (type == Points::PropertyGreyValueList::getClassTypeId())
//~ StrList.push_back("Intensity");
// else if (type == App::PropertyColorList::getClassTypeId())
//~ StrList.push_back("Color");
// }
// }
for (std::map<std::string,App::Property*>::iterator it = Map.begin(); it != Map.end(); ++it) {
Base::Type type = it->second->getTypeId();
if (type == Points::PropertyNormalList::getClassTypeId())
StrList.push_back("Shaded");
else if (type == Points::PropertyGreyValueList::getClassTypeId())
StrList.push_back("Intensity");
else if (type == App::PropertyColorList::getClassTypeId())
StrList.push_back("Color");
}
}
#endif
return StrList;
}