Merge remote-tracking branch 'dieho/master'

Conflicts:
	apps/opencs/view/world/dialoguesubview.cpp
sceneinput
Marc Zinnschlag 10 years ago
commit 23ccee0124

@ -82,7 +82,6 @@ bool CSMWorld::ColumnBase::isId (Display display)
Display_EffectId,
Display_PartRefType,
Display_AiPackageType,
Display_YesNo,
Display_InfoCondFunc,
Display_InfoCondVar,
Display_InfoCondComp,

@ -118,7 +118,6 @@ namespace CSMWorld
Display_EffectId,
Display_PartRefType,
Display_AiPackageType,
Display_YesNo,
Display_InfoCondFunc,
Display_InfoCondVar,
Display_InfoCondComp,

@ -198,7 +198,7 @@ CSMWorld::RefIdCollection::RefIdCollection()
mColumns.back().addColumn(
new RefIdColumn (Columns::ColumnId_AiWanderIdle, CSMWorld::ColumnBase::Display_Integer));
mColumns.back().addColumn(
new RefIdColumn (Columns::ColumnId_AiWanderRepeat, CSMWorld::ColumnBase::Display_YesNo));
new RefIdColumn (Columns::ColumnId_AiWanderRepeat, CSMWorld::ColumnBase::Display_Boolean));
mColumns.back().addColumn(
new RefIdColumn (Columns::ColumnId_AiActivateName, CSMWorld::ColumnBase::Display_String));
mColumns.back().addColumn(

@ -103,7 +103,7 @@ CSVDoc::ViewManager::ViewManager (CSMDoc::DocumentManager& documentManager)
{ CSMWorld::ColumnBase::Display_EffectId, CSMWorld::Columns::ColumnId_EffectId, false },
{ CSMWorld::ColumnBase::Display_PartRefType, CSMWorld::Columns::ColumnId_PartRefType, false },
{ CSMWorld::ColumnBase::Display_AiPackageType, CSMWorld::Columns::ColumnId_AiPackageType, false },
{ CSMWorld::ColumnBase::Display_YesNo, CSMWorld::Columns::ColumnId_AiWanderRepeat, false },
{ CSMWorld::ColumnBase::Display_Boolean, CSMWorld::Columns::ColumnId_AiWanderRepeat, false },
{ CSMWorld::ColumnBase::Display_InfoCondFunc, CSMWorld::Columns::ColumnId_InfoCondFunc, false },
{ CSMWorld::ColumnBase::Display_InfoCondComp, CSMWorld::Columns::ColumnId_InfoCondComp, false },
{ CSMWorld::ColumnBase::Display_RaceSkill, CSMWorld::Columns::ColumnId_RaceSkill, true },

@ -742,13 +742,15 @@ CSVWorld::SimpleDialogueSubView::SimpleDialogueSubView (const CSMWorld::Universa
mMainLayout = new QVBoxLayout(mainWidget);
setWidget (mainWidget);
int idColumn = getTable().findColumnIndex (CSMWorld::Columns::ColumnId_Id);
mEditWidget = new EditWidget(mainWidget,
mTable->getModelIndex(getUniversalId().getId(), 0).row(), mTable, mCommandDispatcher, document, false);
mTable->getModelIndex(getUniversalId().getId(), idColumn).row(), mTable, mCommandDispatcher, document, false);
mMainLayout->addWidget(mEditWidget);
mEditWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
dataChanged(mTable->getModelIndex (getUniversalId().getId(), 0));
dataChanged(mTable->getModelIndex (getUniversalId().getId(), idColumn));
connect(mEditWidget,
SIGNAL(editIdRequest(const CSMWorld::UniversalId &, const std::string &)),
@ -761,8 +763,9 @@ void CSVWorld::SimpleDialogueSubView::setEditLock (bool locked)
if (!mEditWidget) // hack to indicate that getUniversalId().getId() is no longer valid
return;
int idColumn = getTable().findColumnIndex (CSMWorld::Columns::ColumnId_Id);
mLocked = locked;
QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), 0));
QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), idColumn));
if (currentIndex.isValid())
{
@ -777,7 +780,8 @@ void CSVWorld::SimpleDialogueSubView::setEditLock (bool locked)
void CSVWorld::SimpleDialogueSubView::dataChanged (const QModelIndex & index)
{
QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), 0));
int idColumn = getTable().findColumnIndex (CSMWorld::Columns::ColumnId_Id);
QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), idColumn));
if (currentIndex.isValid() &&
(index.parent().isValid() ? index.parent().row() : index.row()) == currentIndex.row())
@ -810,7 +814,8 @@ void CSVWorld::SimpleDialogueSubView::dataChanged (const QModelIndex & index)
void CSVWorld::SimpleDialogueSubView::rowsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
{
QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), 0));
int idColumn = getTable().findColumnIndex (CSMWorld::Columns::ColumnId_Id);
QModelIndex currentIndex(mTable->getModelIndex(getUniversalId().getId(), idColumn));
if (!currentIndex.isValid())
{
@ -908,7 +913,8 @@ void CSVWorld::DialogueSubView::updateUserSetting (const QString& name, const QS
void CSVWorld::DialogueSubView::showPreview ()
{
QModelIndex currentIndex (getTable().getModelIndex (getUniversalId().getId(), 0));
int idColumn = getTable().findColumnIndex (CSMWorld::Columns::ColumnId_Id);
QModelIndex currentIndex (getTable().getModelIndex (getUniversalId().getId(), idColumn));
if (currentIndex.isValid() &&
getTable().getFeatures() & CSMWorld::IdTable::Feature_Preview &&
@ -920,7 +926,8 @@ void CSVWorld::DialogueSubView::showPreview ()
void CSVWorld::DialogueSubView::viewRecord ()
{
QModelIndex currentIndex (getTable().getModelIndex (getUniversalId().getId(), 0));
int idColumn = getTable().findColumnIndex (CSMWorld::Columns::ColumnId_Id);
QModelIndex currentIndex (getTable().getModelIndex (getUniversalId().getId(), idColumn));
if (currentIndex.isValid() &&
currentIndex.row() < getTable().rowCount())
@ -955,7 +962,8 @@ void CSVWorld::DialogueSubView::switchToRow (int row)
void CSVWorld::DialogueSubView::requestFocus (const std::string& id)
{
QModelIndex index = getTable().getModelIndex (id, 0);
int idColumn = getTable().findColumnIndex (CSMWorld::Columns::ColumnId_Id);
QModelIndex index = getTable().getModelIndex (id, idColumn);
if (index.isValid())
switchToRow (index.row());

Loading…
Cancel
Save