Base: Quantity: return std::string
This commit is contained in:
committed by
Yorik van Havre
parent
9f7218ac75
commit
0b3adee2ab
@@ -93,7 +93,7 @@ QVariant Array2DModel::data(const QModelIndex& index, int role) const
|
||||
try {
|
||||
auto column = _property->getColumnType(index.column());
|
||||
if (column == Materials::MaterialValue::Quantity) {
|
||||
Base::Quantity qq = Base::Quantity(0, _property->getColumnUnits(index.column()));
|
||||
Base::Quantity qq = Base::Quantity(0, _property->getColumnUnits(index.column()).toStdString());
|
||||
qq.setFormat(Materials::MaterialValue::getQuantityFormat());
|
||||
return QVariant::fromValue(qq);
|
||||
}
|
||||
@@ -237,7 +237,7 @@ QVariant Array3DDepthModel::data(const QModelIndex& index, int role) const
|
||||
}
|
||||
|
||||
try {
|
||||
Base::Quantity qq = Base::Quantity(0, _property->getColumnUnits(0));
|
||||
Base::Quantity qq = Base::Quantity(0, _property->getColumnUnits(0).toStdString());
|
||||
qq.setFormat(Materials::MaterialValue::getQuantityFormat());
|
||||
return QVariant::fromValue(qq);
|
||||
}
|
||||
@@ -293,7 +293,7 @@ bool Array3DDepthModel::insertRows(int row, int count, const QModelIndex& parent
|
||||
beginInsertRows(parent, row, row + count - 1);
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
auto qq = Base::Quantity(0, _property->getColumnUnits(0));
|
||||
auto qq = Base::Quantity(0, _property->getColumnUnits(0).toStdString());
|
||||
qq.setFormat(Materials::MaterialValue::getQuantityFormat());
|
||||
_value->addDepth(row, qq);
|
||||
}
|
||||
@@ -395,7 +395,7 @@ QVariant Array3DModel::data(const QModelIndex& index, int role) const
|
||||
}
|
||||
|
||||
try {
|
||||
Base::Quantity qq = Base::Quantity(0, _property->getColumnUnits(index.column() + 1));
|
||||
Base::Quantity qq = Base::Quantity(0, _property->getColumnUnits(index.column() + 1).toStdString());
|
||||
qq.setFormat(Materials::MaterialValue::getQuantityFormat());
|
||||
return QVariant::fromValue(qq);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user