mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Revert hacks now that we use Qt5 on Mac
Commitsa24eb8ac12
and0b0860d24a
introduced a nasty hack that was needed back then to make tank and weight selection work on the Mac. But it caused other unpleasant issues (as mentioned in the commit messages). I re-tested this with the current Qt5.3 based builds on Mac and this hack is no longer needed. Fixes #638 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
ca3a6c3faf
commit
e6ce9a4df1
1 changed files with 5 additions and 11 deletions
|
@ -247,10 +247,7 @@ TankInfoDelegate::TankInfoDelegate(QObject *parent) : ComboBoxDelegate(TankInfoM
|
||||||
|
|
||||||
void TankInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
void TankInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
||||||
{
|
{
|
||||||
if (
|
if (hint == QAbstractItemDelegate::NoHint ||
|
||||||
#if !defined __APPLE__
|
|
||||||
hint == QAbstractItemDelegate::NoHint ||
|
|
||||||
#endif
|
|
||||||
hint == QAbstractItemDelegate::RevertModelCache) {
|
hint == QAbstractItemDelegate::RevertModelCache) {
|
||||||
CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model);
|
CylindersModel *mymodel = qobject_cast<CylindersModel *>(currCombo.model);
|
||||||
mymodel->setData(IDX(CylindersModel::TYPE), currCylinderData.type, Qt::EditRole);
|
mymodel->setData(IDX(CylindersModel::TYPE), currCylinderData.type, Qt::EditRole);
|
||||||
|
@ -279,10 +276,7 @@ struct RevertWeightData {
|
||||||
|
|
||||||
void WSInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
void WSInfoDelegate::revertModelData(QWidget *widget, QAbstractItemDelegate::EndEditHint hint)
|
||||||
{
|
{
|
||||||
if (
|
if (hint == QAbstractItemDelegate::NoHint ||
|
||||||
#if !defined __APPLE__
|
|
||||||
hint == QAbstractItemDelegate::NoHint ||
|
|
||||||
#endif
|
|
||||||
hint == QAbstractItemDelegate::RevertModelCache) {
|
hint == QAbstractItemDelegate::RevertModelCache) {
|
||||||
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
||||||
mymodel->setData(IDX(WeightModel::TYPE), currWeight.type, Qt::EditRole);
|
mymodel->setData(IDX(WeightModel::TYPE), currWeight.type, Qt::EditRole);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue