diff options
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r-- | qt-ui/modeldelegates.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index 87846d22b..c0b6522cf 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -247,11 +247,8 @@ TankInfoDelegate::TankInfoDelegate(QObject *parent) : ComboBoxDelegate(TankInfoM void TankInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint) { - if ( -#if !defined __APPLE__ - hint == QAbstractItemDelegate::NoHint || -#endif - hint == QAbstractItemDelegate::RevertModelCache) { + if (hint == QAbstractItemDelegate::NoHint || + hint == QAbstractItemDelegate::RevertModelCache) { CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model); mymodel->setData(IDX(CylindersModel::TYPE), currCylinderData.type, Qt::EditRole); mymodel->passInData(IDX(CylindersModel::WORKINGPRESS), currCylinderData.pressure); @@ -279,11 +276,8 @@ struct RevertWeightData { void WSInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint) { - if ( -#if !defined __APPLE__ - hint == QAbstractItemDelegate::NoHint || -#endif - hint == QAbstractItemDelegate::RevertModelCache) { + if (hint == QAbstractItemDelegate::NoHint || + hint == QAbstractItemDelegate::RevertModelCache) { WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model); mymodel->setData(IDX(WeightModel::TYPE), currWeight.type, Qt::EditRole); mymodel->passInData(IDX(WeightModel::WEIGHT), currWeight.weight); @@ -438,4 +432,4 @@ QSize HTMLDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModel doc.setHtml(options.text); doc.setTextWidth(options.rect.width()); return QSize(doc.idealWidth(), doc.size().height()); -}
\ No newline at end of file +} |