From 8d036a79ebb1a81e656d5e219f526c20e2bc6bee Mon Sep 17 00:00:00 2001 From: Justin Ivany <1406666+jrivany@users.noreply.github.com> Date: Thu, 17 Jan 2019 19:02:45 -0400 Subject: [PATCH 1/2] Fixes #4703 Disable preview for item levelled list --- apps/opencs/view/world/table.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 14df4658d..31180b3f1 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -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 ( mModel->data (index).toInt()); - if (state!=CSMWorld::RecordBase::State_Deleted) + if (state!=CSMWorld::RecordBase::State_Deleted && type != CSMWorld::UniversalId::Type_ItemLevelledList) menu.addAction (mPreviewAction); } } From 33c7e4e948e07808191a59cd8905f71a044bc219 Mon Sep 17 00:00:00 2001 From: Justin Ivany <1406666+jrivany@users.noreply.github.com> Date: Thu, 17 Jan 2019 20:17:18 -0400 Subject: [PATCH 2/2] Don't remove whitespace... --- apps/opencs/view/world/table.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/opencs/view/world/table.cpp b/apps/opencs/view/world/table.cpp index 31180b3f1..eb7b8e334 100644 --- a/apps/opencs/view/world/table.cpp +++ b/apps/opencs/view/world/table.cpp @@ -146,6 +146,7 @@ void CSVWorld::Table::contextMenuEvent (QContextMenuEvent *event) QModelIndex index = mModel->index (row, mModel->findColumnIndex (CSMWorld::Columns::ColumnId_Modification)); + CSMWorld::RecordBase::State state = static_cast ( mModel->data (index).toInt());