| 1001 | } |
| 1002 | |
| 1003 | void InputEditorView::pasteInputs() |
| 1004 | { |
| 1005 | const QModelIndexList indexes = selectionModel()->selectedRows(); |
| 1006 | |
| 1007 | /* If no row was selected, return */ |
| 1008 | if (indexes.count() == 0) |
| 1009 | return; |
| 1010 | |
| 1011 | /* If we selected only one row, paste the all inputs at that row */ |
| 1012 | if (indexes.count() == 1) { |
| 1013 | inputEditorModel->pasteInputs(indexes[0].row()); |
| 1014 | } |
| 1015 | |
| 1016 | /* Else, paste inputs inside the selected range, with repeated inputs if |
| 1017 | * there are more selected rows that frames in the clipboard. |
| 1018 | * This allows for exemple to copy a single frame and paste it to multiple |
| 1019 | * rows. */ |
| 1020 | else { |
| 1021 | applyToSelectedRanges([this](int min, int max){inputEditorModel->pasteInputsInRange(min, max-min+1);}); |
| 1022 | } |
| 1023 | |
| 1024 | selectionModel()->clear(); |
| 1025 | } |
| 1026 | |
| 1027 | void InputEditorView::pasteInsertInputs() |
| 1028 | { |
nothing calls this directly
no test coverage detected