diff --git a/src/App/PropertyUnits.cpp b/src/App/PropertyUnits.cpp index 351708b12..8b294d39d 100644 --- a/src/App/PropertyUnits.cpp +++ b/src/App/PropertyUnits.cpp @@ -132,42 +132,6 @@ PropertyLength::PropertyLength() setUnit(Base::Unit::Length); } -const char* PropertyLength::getEditorName(void) const -{ -#ifdef UseUnitsInGui - return "Gui::PropertyEditor::PropertyUnitItem"; -#else - return "Gui::PropertyEditor::PropertyFloatItem"; -#endif -} - - -void PropertyLength::setPyObject(PyObject *value) -{ -#ifdef UseUnitsInGui - setValue(UnitsApi::toDblWithUserPrefs(Length,value)); - -#else - double val=0.0f; - if (PyFloat_Check(value)) { - val = PyFloat_AsDouble(value); - } - else if(PyInt_Check(value)) { - val = (double) PyInt_AsLong(value); - } - else { - std::string error = std::string("type must be float or int, not "); - error += value->ob_type->tp_name; - throw Base::TypeError(error); - } - - if (val < 0.0f) - throw Base::ValueError("value must be nonnegative"); - - setValue(val); -#endif -} - //************************************************************************** //************************************************************************** // PropertyAngle diff --git a/src/App/PropertyUnits.h b/src/App/PropertyUnits.h index e2a6bf632..4cf8a5d1b 100644 --- a/src/App/PropertyUnits.h +++ b/src/App/PropertyUnits.h @@ -93,9 +93,6 @@ class AppExport PropertyLength : public PropertyQuantity public: PropertyLength(void); virtual ~PropertyLength(){} - virtual const char* getEditorName(void) const; - - virtual void setPyObject(PyObject *); }; /** Angle property