From 17bdbb157e76a00b4b6307cd0a6c295c485bf9c4 Mon Sep 17 00:00:00 2001 From: triplus Date: Sun, 23 Dec 2018 01:41:16 +0100 Subject: [PATCH] Point cloud display mode enumeration After point cloud is imported and saved to a file, opening such file introduces issue with point cloud feature display mode property. Forum discussion: https://forum.freecadweb.org/viewtopic.php?f=3&t=32808 --- src/Mod/Points/Gui/ViewProvider.cpp | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/Mod/Points/Gui/ViewProvider.cpp b/src/Mod/Points/Gui/ViewProvider.cpp index 0de552a1f8..dfae02a69e 100644 --- a/src/Mod/Points/Gui/ViewProvider.cpp +++ b/src/Mod/Points/Gui/ViewProvider.cpp @@ -242,21 +242,23 @@ std::vector ViewProviderPoints::getDisplayModes(void) const { std::vector StrList; StrList.push_back("Points"); + StrList.push_back("Color"); + StrList.push_back("Shaded"); - if (pcObject) { - std::map Map; - pcObject->getPropertyMap(Map); + // if (pcObject) { + // std::map Map; + // pcObject->getPropertyMap(Map); - for (std::map::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::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"); + // } + // } return StrList; }