1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-15 16:39:40 +00:00

Fixed complitaion.

This commit is contained in:
Marek Kochanowicz 2014-06-16 10:22:14 +02:00
parent 48691136fb
commit 7eb82f74ae

View file

@ -600,12 +600,12 @@ void CSVWorld::DialogueSubView::setEditLock (bool locked)
mLocked = locked;
QModelIndex currentIndex(mTable->getModelIndex(mCurrentId, 0));
mEditWidget->setDisabled (state==CSMWorld::RecordBase::State_Deleted || locked);
if (currentIndex.isValid())
{
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State>(mTable->data (mTable->index (currentIndex.row(), 1)).toInt());
mEditWidget->setDisabled (state==CSMWorld::RecordBase::State_Deleted || locked);
mCommandDispatcher.setEditLock (locked);
}
@ -615,11 +615,12 @@ void CSVWorld::DialogueSubView::dataChanged(const QModelIndex & index)
{
QModelIndex currentIndex(mTable->getModelIndex(mCurrentId, 0));
mEditWidget->setDisabled (state==CSMWorld::RecordBase::State_Deleted || mLocked);
if (currentIndex.isValid() && index.row() == currentIndex.row())
{
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State>(mTable->data (mTable->index (currentIndex.row(), 1)).toInt());
mEditWidget->setDisabled (state==CSMWorld::RecordBase::State_Deleted || mLocked);
}
}