forked from teamnwah/openmw-tes3coop
Revert auto expansion of enums as it was interfering with row based operations. Fix default values of magic effect skill & attributes.
This commit is contained in:
parent
48a6006202
commit
7561b195ab
3 changed files with 5 additions and 6 deletions
|
@ -252,8 +252,8 @@ namespace CSMWorld
|
|||
// blank row
|
||||
ESM::ENAMstruct effect;
|
||||
effect.mEffectID = 0;
|
||||
effect.mSkill = 0;
|
||||
effect.mAttribute = 0;
|
||||
effect.mSkill = -1;
|
||||
effect.mAttribute = -1;
|
||||
effect.mRange = 0;
|
||||
effect.mArea = 0;
|
||||
effect.mDuration = 0;
|
||||
|
|
|
@ -443,9 +443,10 @@ void CSVWorld::EditWidget::remake(int row)
|
|||
|
||||
NestedTable* table = new NestedTable(mDocument, mNestedModels.back(), this);
|
||||
// FIXME: does not work well when enum delegates are used
|
||||
//table->resizeColumnsToContents();
|
||||
table->setVisible(false);
|
||||
table->resizeColumnsToContents();
|
||||
table->setVisible(true);
|
||||
table->setEditTriggers(QAbstractItemView::SelectedClicked | QAbstractItemView::CurrentChanged);
|
||||
table->setSelectionBehavior(QAbstractItemView::SelectItems);
|
||||
|
||||
QLabel* label =
|
||||
new QLabel (mTable->headerData (i, Qt::Horizontal, Qt::DisplayRole).toString(), mMainWidget);
|
||||
|
|
|
@ -88,8 +88,6 @@ void CSVWorld::EnumDelegate::setEditorData (QWidget *editor, const QModelIndex&
|
|||
if (mValues[i].first==value)
|
||||
{
|
||||
comboBox->setCurrentIndex (i);
|
||||
if(!tryDisplay)
|
||||
comboBox->showPopup();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue