mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 10:06:42 +00:00
Merge branch 'preview_levelled_item' into 'master'
Fixes #4703 Disable preview for item leveled list Closes #4703 See merge request OpenMW/openmw!57
This commit is contained in:
commit
f8b34bf7f1
1 changed files with 4 additions and 1 deletions
|
@ -141,13 +141,16 @@ void CSVWorld::Table::contextMenuEvent (QContextMenuEvent *event)
|
||||||
|
|
||||||
if (mModel->getFeatures() & CSMWorld::IdTableBase::Feature_Preview)
|
if (mModel->getFeatures() & CSMWorld::IdTableBase::Feature_Preview)
|
||||||
{
|
{
|
||||||
|
const CSMWorld::UniversalId id = getUniversalId(currentRow);
|
||||||
|
const CSMWorld::UniversalId::Type type = id.getType();
|
||||||
|
|
||||||
QModelIndex index = mModel->index (row,
|
QModelIndex index = mModel->index (row,
|
||||||
mModel->findColumnIndex (CSMWorld::Columns::ColumnId_Modification));
|
mModel->findColumnIndex (CSMWorld::Columns::ColumnId_Modification));
|
||||||
|
|
||||||
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State> (
|
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State> (
|
||||||
mModel->data (index).toInt());
|
mModel->data (index).toInt());
|
||||||
|
|
||||||
if (state!=CSMWorld::RecordBase::State_Deleted)
|
if (state!=CSMWorld::RecordBase::State_Deleted && type != CSMWorld::UniversalId::Type_ItemLevelledList)
|
||||||
menu.addAction (mPreviewAction);
|
menu.addAction (mPreviewAction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue