mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 12:06:41 +00:00
Change the cell edit selection behaviour of the nested tables. Also auto-expand the enum delegate selections (both main table as well as nested table in the dialogue subview)
This commit is contained in:
parent
f88be67556
commit
5e84858c0b
2 changed files with 3 additions and 0 deletions
|
@ -444,6 +444,8 @@ 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->setSelectionBehavior(QAbstractItemView::SelectItems);
|
||||||
|
|
||||||
|
|
||||||
QLabel* label =
|
QLabel* label =
|
||||||
|
|
|
@ -88,6 +88,7 @@ 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();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue