mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Corrected spelling of "weight" in the preferences dialog and code
"weight" was spelled as "weigth" in a few places in the code, but more importantly, it was misspelled in the preferences dialog. A minor nit-pick, maybe, but it still drew the eye in the dialog and looked weird. Signed-off-by: Benjamin Fogel <benjaminfogel@yahoo.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
db17edda65
commit
c68296c5bb
2 changed files with 9 additions and 9 deletions
|
@ -201,17 +201,17 @@ QWidget* TankInfoDelegate::createEditor(QWidget* parent, const QStyleOptionViewI
|
||||||
return delegate;
|
return delegate;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct RevertWeigthData {
|
struct RevertWeightData {
|
||||||
QString type;
|
QString type;
|
||||||
int weigth;
|
int weight;
|
||||||
} currWeigth;
|
} currWeight;
|
||||||
|
|
||||||
void WSInfoDelegate::revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint)
|
void WSInfoDelegate::revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint)
|
||||||
{
|
{
|
||||||
if (hint == QAbstractItemDelegate::NoHint || hint == QAbstractItemDelegate::RevertModelCache){
|
if (hint == QAbstractItemDelegate::NoHint || hint == QAbstractItemDelegate::RevertModelCache){
|
||||||
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
||||||
mymodel->setData(IDX(WeightModel::TYPE), currWeigth.type, Qt::EditRole);
|
mymodel->setData(IDX(WeightModel::TYPE), currWeight.type, Qt::EditRole);
|
||||||
mymodel->passInData(IDX(WeightModel::WEIGHT), currWeigth.weigth);
|
mymodel->passInData(IDX(WeightModel::WEIGHT), currWeight.weight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@ void WSInfoDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, co
|
||||||
}
|
}
|
||||||
mymodel->setData(IDX(WeightModel::TYPE), v, Qt::EditRole);
|
mymodel->setData(IDX(WeightModel::TYPE), v, Qt::EditRole);
|
||||||
mymodel->passInData(IDX(WeightModel::WEIGHT), grams);
|
mymodel->passInData(IDX(WeightModel::WEIGHT), grams);
|
||||||
qDebug() << "Fixme, every weigth is 0.0 grams. see:" << grams;
|
qDebug() << "Fixme, every weight is 0.0 grams. see:" << grams;
|
||||||
}
|
}
|
||||||
|
|
||||||
WSInfoDelegate::WSInfoDelegate(QObject* parent): ComboBoxDelegate(WSInfoModel::instance(), parent)
|
WSInfoDelegate::WSInfoDelegate(QObject* parent): ComboBoxDelegate(WSInfoModel::instance(), parent)
|
||||||
|
@ -251,8 +251,8 @@ QWidget* WSInfoDelegate::createEditor(QWidget* parent, const QStyleOptionViewIte
|
||||||
QWidget *editor = ComboBoxDelegate::createEditor(parent, option, index);
|
QWidget *editor = ComboBoxDelegate::createEditor(parent, option, index);
|
||||||
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
||||||
weightsystem_t *ws = mymodel->weightSystemAt(index);
|
weightsystem_t *ws = mymodel->weightSystemAt(index);
|
||||||
currWeigth.type = ws->description;
|
currWeight.type = ws->description;
|
||||||
currWeigth.weigth = ws->weight.grams;
|
currWeight.weight = ws->weight.grams;
|
||||||
return editor;
|
return editor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -374,7 +374,7 @@
|
||||||
<item row="4" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Weigth</string>
|
<string>Weight</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Reference in a new issue