Only update contents of the Edit Cell dock when its visible

This significantly speeds up keyboard navigation with large
cell data (eg images), then the Edit Cell dock is turned off
This commit is contained in:
Justin Clift
2016-08-06 15:22:27 +01:00
parent 54a17e2727
commit e66ac3e666

View File

@@ -861,8 +861,10 @@ void MainWindow::dataTableSelectionChanged(const QModelIndex& index)
// Don't allow editing of other objects than tables
editDock->allowEditing(edit);
// Load the current value into the edit dock only
editDock->loadText(index.data(Qt::EditRole).toByteArray(), index.row(), index.column());
// If the Edit Cell dock is visible, load the new value into it
if (editDock->isVisible()) {
editDock->loadText(index.data(Qt::EditRole).toByteArray(), index.row(), index.column());
}
}
/*