mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Fixes #4703 Disable preview for item levelled list
This commit is contained in:
parent
fe69e5507d
commit
8d036a79eb
@ -141,13 +141,15 @@ void CSVWorld::Table::contextMenuEvent (QContextMenuEvent *event)
|
||||
|
||||
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,
|
||||
mModel->findColumnIndex (CSMWorld::Columns::ColumnId_Modification));
|
||||
|
||||
CSMWorld::RecordBase::State state = static_cast<CSMWorld::RecordBase::State> (
|
||||
mModel->data (index).toInt());
|
||||
|
||||
if (state!=CSMWorld::RecordBase::State_Deleted)
|
||||
if (state!=CSMWorld::RecordBase::State_Deleted && type != CSMWorld::UniversalId::Type_ItemLevelledList)
|
||||
menu.addAction (mPreviewAction);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user