diff --git a/apps/opencs/model/world/nestedcoladapterimp.hpp b/apps/opencs/model/world/nestedcoladapterimp.hpp index 1ee447f34..841c3955a 100644 --- a/apps/opencs/model/world/nestedcoladapterimp.hpp +++ b/apps/opencs/model/world/nestedcoladapterimp.hpp @@ -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; diff --git a/apps/opencs/view/world/dialoguesubview.cpp b/apps/opencs/view/world/dialoguesubview.cpp index 9358bf6c7..6626d67c3 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -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); diff --git a/apps/opencs/view/world/enumdelegate.cpp b/apps/opencs/view/world/enumdelegate.cpp index bda93678a..eb523f781 100644 --- a/apps/opencs/view/world/enumdelegate.cpp +++ b/apps/opencs/view/world/enumdelegate.cpp @@ -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; } }