mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 05:09:53 +00:00
Fixed complitaion.
This commit is contained in:
parent
48691136fb
commit
7eb82f74ae
1 changed files with 4 additions and 3 deletions
|
@ -600,12 +600,12 @@ void CSVWorld::DialogueSubView::setEditLock (bool locked)
|
||||||
mLocked = locked;
|
mLocked = locked;
|
||||||
QModelIndex currentIndex(mTable->getModelIndex(mCurrentId, 0));
|
QModelIndex currentIndex(mTable->getModelIndex(mCurrentId, 0));
|
||||||
|
|
||||||
mEditWidget->setDisabled (state==CSMWorld::RecordBase::State_Deleted || locked);
|
|
||||||
|
|
||||||
if (currentIndex.isValid())
|
if (currentIndex.isValid())
|
||||||
{
|
{
|
||||||
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State>(mTable->data (mTable->index (currentIndex.row(), 1)).toInt());
|
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);
|
mCommandDispatcher.setEditLock (locked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -615,11 +615,12 @@ void CSVWorld::DialogueSubView::dataChanged(const QModelIndex & index)
|
||||||
{
|
{
|
||||||
QModelIndex currentIndex(mTable->getModelIndex(mCurrentId, 0));
|
QModelIndex currentIndex(mTable->getModelIndex(mCurrentId, 0));
|
||||||
|
|
||||||
mEditWidget->setDisabled (state==CSMWorld::RecordBase::State_Deleted || mLocked);
|
|
||||||
|
|
||||||
if (currentIndex.isValid() && index.row() == currentIndex.row())
|
if (currentIndex.isValid() && index.row() == currentIndex.row())
|
||||||
{
|
{
|
||||||
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State>(mTable->data (mTable->index (currentIndex.row(), 1)).toInt());
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue