mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 02:13:24 +00:00
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>
This commit is contained in:
parent
58088d5897
commit
a24eb8ac12
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue