Integrate Werners & Jans double branch
Move from float to double Further suggestions for float -> double move Moved Tools2D from float to double More suggestions for float->double move from Gui subdirectory Changes to FEM constraint visuals for float->double move Suggested changes for float -> double move Suggestions for Part module moving float -> double
This commit is contained in:
@@ -877,15 +877,15 @@ QVariant PropertyVectorItem::value(const App::Property* prop) const
|
||||
{
|
||||
assert(prop && prop->getTypeId().isDerivedFrom(App::PropertyVector::getClassTypeId()));
|
||||
|
||||
const Base::Vector3f& value = static_cast<const App::PropertyVector*>(prop)->getValue();
|
||||
return QVariant::fromValue<Base::Vector3f>(value);
|
||||
const Base::Vector3d& value = static_cast<const App::PropertyVector*>(prop)->getValue();
|
||||
return QVariant::fromValue<Base::Vector3d>(value);
|
||||
}
|
||||
|
||||
void PropertyVectorItem::setValue(const QVariant& value)
|
||||
{
|
||||
if (!value.canConvert<Base::Vector3f>())
|
||||
if (!value.canConvert<Base::Vector3d>())
|
||||
return;
|
||||
const Base::Vector3f& val = value.value<Base::Vector3f>();
|
||||
const Base::Vector3d& val = value.value<Base::Vector3d>();
|
||||
QString data = QString::fromAscii("(%1, %2, %3)")
|
||||
.arg(val.x,0,'f',decimals())
|
||||
.arg(val.y,0,'f',decimals())
|
||||
@@ -920,32 +920,32 @@ QVariant PropertyVectorItem::editorData(QWidget *editor) const
|
||||
|
||||
double PropertyVectorItem::x() const
|
||||
{
|
||||
return data(1,Qt::EditRole).value<Base::Vector3f>().x;
|
||||
return data(1,Qt::EditRole).value<Base::Vector3d>().x;
|
||||
}
|
||||
|
||||
void PropertyVectorItem::setX(double x)
|
||||
{
|
||||
setData(QVariant::fromValue(Base::Vector3f(x, y(), z())));
|
||||
setData(QVariant::fromValue(Base::Vector3d(x, y(), z())));
|
||||
}
|
||||
|
||||
double PropertyVectorItem::y() const
|
||||
{
|
||||
return data(1,Qt::EditRole).value<Base::Vector3f>().y;
|
||||
return data(1,Qt::EditRole).value<Base::Vector3d>().y;
|
||||
}
|
||||
|
||||
void PropertyVectorItem::setY(double y)
|
||||
{
|
||||
setData(QVariant::fromValue(Base::Vector3f(x(), y, z())));
|
||||
setData(QVariant::fromValue(Base::Vector3d(x(), y, z())));
|
||||
}
|
||||
|
||||
double PropertyVectorItem::z() const
|
||||
{
|
||||
return data(1,Qt::EditRole).value<Base::Vector3f>().z;
|
||||
return data(1,Qt::EditRole).value<Base::Vector3d>().z;
|
||||
}
|
||||
|
||||
void PropertyVectorItem::setZ(double z)
|
||||
{
|
||||
setData(QVariant::fromValue(Base::Vector3f(x(), y(), z)));
|
||||
setData(QVariant::fromValue(Base::Vector3d(x(), y(), z)));
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user