fix: Improve error handling in product composition insertion and fix ItemNumberDelegate::setEditorData
This commit is contained in:
@@ -28,9 +28,7 @@ QWidget *ItemNumberDelegate::createEditor(QWidget *parent, const QStyleOptionVie
|
||||
|
||||
void ItemNumberDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
|
||||
{
|
||||
QString val = index.model()->data(index, Qt::EditRole).toString();
|
||||
val.replace(QString(","), QString("."));
|
||||
double value = val.toDouble(); //index.model()->data(index, Qt::EditRole).toDouble();
|
||||
double value = index.model()->data(index, Qt::EditRole).toDouble();
|
||||
static_cast<QDoubleSpinBox*>(editor)->setValue(value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user