MCPcopy Create free account
hub / github.com/clementgallet/libTAS / pasteInputs

Method pasteInputs

src/program/ui/InputEditorView.cpp:1003–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003void 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
1027void InputEditorView::pasteInsertInputs()
1028{

Callers

nothing calls this directly

Calls 2

pasteInputsInRangeMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected