summaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-12-11 21:55:35 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-12-12 03:26:39 +0100
commit0b0860d24a81b0bce9ea4f972cb088d5a217c4f5 (patch)
tree83003ebe7a19a47ff3aa0e5806a7ea533f3e7aa9 /qt-ui/modeldelegates.cpp
parent0b5f9512efb8d861b3d935278f22d0cc5d6b8d4a (diff)
downloadsubsurface-0b0860d24a81b0bce9ea4f972cb088d5a217c4f5.tar.gz
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 <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/modeldelegates.cpp')
-rw-r--r--qt-ui/modeldelegates.cpp6
1 files changed, 5 insertions, 1 deletions
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<WeightModel *>(currCombo.model);
mymodel->setData(IDX(WeightModel::TYPE), currWeight.type, Qt::EditRole);
mymodel->passInData(IDX(WeightModel::WEIGHT), currWeight.weight);