summaryrefslogtreecommitdiffstats
path: root/qt-ui/modeldelegates.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-21 08:08:04 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-21 08:08:04 -0800
commita24eb8ac120bf6999eeda973e06644035c51800e (patch)
tree47461ffe322dd3e99b7c3369d9035d9a5dd4a7d1 /qt-ui/modeldelegates.cpp
parent58088d589714d4e114bd84a98f27dc4625eb48bb (diff)
downloadsubsurface-a24eb8ac120bf6999eeda973e06644035c51800e.tar.gz
Hack to make tank selection work on Mac
This is an ugly hack as it partially breaks the ability to abort a selection (so if you click outside of the combobox, the last value you hovered over is selected). But this seems much better than not being able to select a different tank at all. Fixes #275 (and by 'Fixes' I mean "hacks to sort of make work"... but the trac automation is rather inflexible in which words it understands...) 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 cb1af8706..2b86476e1 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -224,7 +224,11 @@ TankInfoDelegate::TankInfoDelegate(QObject* parent): ComboBoxDelegate(TankInfoMo
void TankInfoDelegate::revertModelData(QWidget* widget, QAbstractItemDelegate::EndEditHint hint)
{
- if (hint == QAbstractItemDelegate::NoHint || hint == QAbstractItemDelegate::RevertModelCache){
+ if (
+#if !defined __APPLE__
+ hint == QAbstractItemDelegate::NoHint ||
+#endif
+ 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);