| 929 | } |
| 930 | |
| 931 | void InputEditorView::deleteInput() |
| 932 | { |
| 933 | if (!selectionModel()->hasSelection()) |
| 934 | return; |
| 935 | |
| 936 | /* Removing rows must be done in reversed order so that row indices are valid */ |
| 937 | int min_row = applyToSelectedRangesReversed([this](int min, int max){ |
| 938 | inputEditorModel->removeMarkersInRange(min, max); |
| 939 | inputEditorModel->removeRows(min, max - min + 1); |
| 940 | }); |
| 941 | |
| 942 | /* Select the next frame */ |
| 943 | QModelIndex newSel = inputEditorModel->index(min_row, 0); |
| 944 | selectionModel()->clear(); |
| 945 | setCurrentIndex(newSel); |
| 946 | selectionModel()->select(newSel, QItemSelectionModel::Select | QItemSelectionModel::Rows); |
| 947 | } |
| 948 | |
| 949 | void InputEditorView::truncateInputs() |
| 950 | { |
nothing calls this directly
no test coverage detected