Fixed creating recursion on the connections

Ugh. Each time you wanted to change a cylinder, a new connection was
being created on this object, delaying the correctly setup of the item.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-07-16 19:10:23 -03:00 committed by Dirk Hohndel
parent b66f679d64
commit e5b06bf6c8

View file

@ -66,6 +66,8 @@ ComboBoxDelegate::ComboBoxDelegate(QAbstractItemModel *model, QObject *parent) :
{
connect(this, SIGNAL(closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint)),
this, SLOT(revertModelData(QWidget *, QAbstractItemDelegate::EndEditHint)));
connect(this, SIGNAL(closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint)),
this, SLOT(fixTabBehavior()));
}
void ComboBoxDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const
@ -105,7 +107,6 @@ QWidget *ComboBoxDelegate::createEditor(QWidget *parent, const QStyleOptionViewI
connect(comboDelegate, SIGNAL(activated(QString)), this, SLOT(fakeActivation()));
connect(comboPopup, SIGNAL(entered(QModelIndex)), this, SLOT(testActivation(QModelIndex)));
connect(comboPopup, SIGNAL(activated(QModelIndex)), this, SLOT(fakeActivation()));
connect(this, SIGNAL(closeEditor(QWidget *, QAbstractItemDelegate::EndEditHint)), this, SLOT(fixTabBehavior()));
currCombo.comboEditor = comboDelegate;
currCombo.currRow = index.row();
currCombo.model = const_cast<QAbstractItemModel *>(index.model());