Remove unused code into App

This commit is contained in:
andrea
2022-07-11 16:04:39 +02:00
committed by Uwe
parent adff3da37a
commit 0c4c3cc786
10 changed files with 2 additions and 365 deletions

View File

@@ -311,19 +311,7 @@ void PropertyEnumeration::setEnums(const char **plEnums)
void PropertyEnumeration::setEnums(const std::vector<std::string> &Enums)
{
// _enum.setEnums() will preserve old value possible, so no need to do it
// here
#if 0
if (_enum.isValid()) {
const std::string &index = getValueAsString();
_enum.setEnums(Enums);
setValue(index.c_str());
} else {
_enum.setEnums(Enums);
}
#else
setEnumVector(Enums);
#endif
}
void PropertyEnumeration::setValue(const char *value)
@@ -459,13 +447,6 @@ void PropertyEnumeration::Restore(Base::XMLReader &reader)
PyObject * PropertyEnumeration::getPyObject()
{
if (!_enum.isValid()) {
// There is legimate use case of having an empty PropertyEnumeration and
// set its enumeration items later. Returning error here cause hasattr()
// to return False even though the property exists.
//
// PyErr_SetString(PyExc_AssertionError, "The enum is empty");
// return 0;
//
Py_Return;
}