| 1121 | } |
| 1122 | |
| 1123 | void QMappingSequenceEdit::keepSelectionEmptyAndScrollToRow(int row) |
| 1124 | { |
| 1125 | MappingSequenceEditTableWidget *table = ui->mappingSequenceEditTable; |
| 1126 | if (table->rowCount() <= 0) { |
| 1127 | return; |
| 1128 | } |
| 1129 | |
| 1130 | row = qBound(0, row, table->rowCount() - 1); |
| 1131 | |
| 1132 | // Keep selection empty if it was empty before insert. |
| 1133 | table->clearSelection(); |
| 1134 | table->setCurrentCell(row, 0, QItemSelectionModel::NoUpdate); |
| 1135 | if (QTableWidgetItem *item = table->item(row, 0)) { |
| 1136 | table->scrollToItem(item, QAbstractItemView::EnsureVisible); |
| 1137 | } |
| 1138 | } |
| 1139 | |
| 1140 | bool QMappingSequenceEdit::validateOrAllowEmptyMappingKey(QString *trimmedMappingKey, QString *popupMessage) const |
| 1141 | { |
nothing calls this directly
no outgoing calls
no test coverage detected