+ remove unneeded methods from PropertyLength

This commit is contained in:
wmayer 2014-02-13 17:24:03 +01:00
parent 65d001f3d4
commit 5b9f076c53
2 changed files with 0 additions and 39 deletions

View File

@ -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

View File

@ -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