From 0b0860d24a81b0bce9ea4f972cb088d5a217c4f5 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 11 Dec 2013 21:55:35 -0200 Subject: Copyed the code from Dirk that solved the mac issue on cylinders. This is the same code that Dirk used on the Mac to fix the bad-behavior of Cylinder Selection, this time applyed to Weigthsystem selection. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/modeldelegates.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'qt-ui/modeldelegates.cpp') diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp index c3324ed72..4c8869fe8 100644 --- a/qt-ui/modeldelegates.cpp +++ b/qt-ui/modeldelegates.cpp @@ -262,7 +262,11 @@ struct RevertWeightData { void WSInfoDelegate::revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint) { - if (hint == QAbstractItemDelegate::NoHint || hint == QAbstractItemDelegate::RevertModelCache){ + if ( +#if !defined __APPLE__ + hint == QAbstractItemDelegate::NoHint || +#endif + hint == QAbstractItemDelegate::RevertModelCache) { WeightModel *mymodel = qobject_cast(currCombo.model); mymodel->setData(IDX(WeightModel::TYPE), currWeight.type, Qt::EditRole); mymodel->passInData(IDX(WeightModel::WEIGHT), currWeight.weight); -- cgit v1.2.3-70-g09d2