forked from mirror/openmw-tes3mp
Prevent enum delegates from auto expanding when opening a dialogue subview.
This commit is contained in:
parent
5e84858c0b
commit
48a6006202
2 changed files with 3 additions and 3 deletions
|
@ -444,10 +444,9 @@ void CSVWorld::EditWidget::remake(int row)
|
||||||
NestedTable* table = new NestedTable(mDocument, mNestedModels.back(), this);
|
NestedTable* table = new NestedTable(mDocument, mNestedModels.back(), this);
|
||||||
// FIXME: does not work well when enum delegates are used
|
// FIXME: does not work well when enum delegates are used
|
||||||
//table->resizeColumnsToContents();
|
//table->resizeColumnsToContents();
|
||||||
table->setEditTriggers(QAbstractItemView::CurrentChanged);
|
table->setEditTriggers(QAbstractItemView::SelectedClicked | QAbstractItemView::CurrentChanged);
|
||||||
table->setSelectionBehavior(QAbstractItemView::SelectItems);
|
table->setSelectionBehavior(QAbstractItemView::SelectItems);
|
||||||
|
|
||||||
|
|
||||||
QLabel* label =
|
QLabel* label =
|
||||||
new QLabel (mTable->headerData (i, Qt::Horizontal, Qt::DisplayRole).toString(), mMainWidget);
|
new QLabel (mTable->headerData (i, Qt::Horizontal, Qt::DisplayRole).toString(), mMainWidget);
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,8 @@ void CSVWorld::EnumDelegate::setEditorData (QWidget *editor, const QModelIndex&
|
||||||
if (mValues[i].first==value)
|
if (mValues[i].first==value)
|
||||||
{
|
{
|
||||||
comboBox->setCurrentIndex (i);
|
comboBox->setCurrentIndex (i);
|
||||||
comboBox->showPopup();
|
if(!tryDisplay)
|
||||||
|
comboBox->showPopup();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue