[rkward] rkward/dataeditor: Mark trailing rows / columns as selectable. This fixes highlighting of current cell, and Tab-key navigation.

Thomas Friedrichsmeier null at kde.org
Tue May 15 06:19:18 UTC 2018


Git commit 371a86bcb6156353a0a60d42c8d8d9dbad441b62 by Thomas Friedrichsmeier.
Committed on 15/05/2018 at 06:18.
Pushed by tfry into branch 'master'.

Mark trailing rows / columns as selectable. This fixes highlighting of current cell, and Tab-key navigation.

M  +2    -2    rkward/dataeditor/rkvareditmodel.cpp

https://commits.kde.org/rkward/371a86bcb6156353a0a60d42c8d8d9dbad441b62

diff --git a/rkward/dataeditor/rkvareditmodel.cpp b/rkward/dataeditor/rkvareditmodel.cpp
index 6dbd7807..fc6fac40 100644
--- a/rkward/dataeditor/rkvareditmodel.cpp
+++ b/rkward/dataeditor/rkvareditmodel.cpp
@@ -329,7 +329,7 @@ Qt::ItemFlags RKVarEditModel::flags (const QModelIndex& index) const {
 	if ((col < var_col_offset) && header_locked) return flags;
 
 	if (!edit_blocks) flags |= Qt::ItemIsEditable | Qt::ItemIsEnabled;
-	if ((col < objects.size ()) && (row < objects[0]->getLength ())) flags |= Qt::ItemIsSelectable;
+	flags |= Qt::ItemIsSelectable;   // NOTE: Setting this even for trailing rows / cols, as highlighting of current cell is based on this   // if ((col < objects.size ()) && (row < objects[0]->getLength ())) flags |= Qt::ItemIsSelectable;
 
 	return flags;
 }
@@ -592,7 +592,7 @@ Qt::ItemFlags RKVarEditMetaModel::flags (const QModelIndex& index) const {
 
 	if (col < var_col_offset) return flags;
 	if (!data_model->edit_blocks) flags |= Qt::ItemIsEditable | Qt::ItemIsEnabled;
-	if ((col < data_model->objects.size ()) && (row < RowCount)) flags |= Qt::ItemIsSelectable;
+	flags |= Qt::ItemIsSelectable;   // NOTE: Setting this even for trailing rows / cols, as highlighting of current cell is based on this   // if ((col < data_model->objects.size ()) && (row < RowCount)) flags |= Qt::ItemIsSelectable;
 
 	return flags;
 }



More information about the rkward-tracker mailing list