| 947 | } |
| 948 | |
| 949 | void InputEditorView::truncateInputs() |
| 950 | { |
| 951 | QMessageBox confirmBox; |
| 952 | |
| 953 | confirmBox.setText("Really truncate the TAS?"); |
| 954 | confirmBox.setInformativeText("Do you want to truncate all inputs beyond this point?"); |
| 955 | |
| 956 | confirmBox.setStandardButtons(QMessageBox::No | QMessageBox::Yes); |
| 957 | confirmBox.setDefaultButton(QMessageBox::Yes); |
| 958 | |
| 959 | if (confirmBox.exec() != QMessageBox::Yes) return; |
| 960 | |
| 961 | |
| 962 | |
| 963 | const QModelIndexList indexes = selectionModel()->selectedRows(); |
| 964 | |
| 965 | /* If no row was selected, return */ |
| 966 | if (indexes.count() == 0) |
| 967 | return; |
| 968 | |
| 969 | int nbRows = inputEditorModel->frameCount(); |
| 970 | |
| 971 | inputEditorModel->removeRows(indexes[0].row()+1, nbRows-indexes[0].row()-1); |
| 972 | } |
| 973 | |
| 974 | void InputEditorView::clearInputs() |
| 975 | { |
nothing calls this directly
no test coverage detected