From 829345257c13c1991eab1a9bd008a674c2987a8f Mon Sep 17 00:00:00 2001 From: Rob Cutmore Date: Sat, 24 Sep 2016 10:36:00 -0400 Subject: [PATCH] Allow disabled nested tables to be scrollable --- apps/opencs/view/world/dialoguesubview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/opencs/view/world/dialoguesubview.cpp b/apps/opencs/view/world/dialoguesubview.cpp index 0a79aac2b..b6e8f3766 100644 --- a/apps/opencs/view/world/dialoguesubview.cpp +++ b/apps/opencs/view/world/dialoguesubview.cpp @@ -583,8 +583,13 @@ void CSVWorld::EditWidget::remake(int row) table->resizeColumnsToContents(); if (!editable) { + // Make table look disabled without actually disabling. + // This allows user to scroll through table without + // being able to edit items. table->setEditTriggers(QAbstractItemView::NoEditTriggers); - table->setEnabled(false); + table->setSelectionMode(QAbstractItemView::NoSelection); + table->setFocusPolicy(Qt::NoFocus); + table->setStyleSheet("background-color: whitesmoke"); } int rows = mTable->rowCount(mTable->index(row, i));