add comment
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user