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

Method pasteInsertInputs

src/program/ui/InputEditorModel.cpp:928–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

926}
927
928int InputEditorModel::pasteInsertInputs(int row)
929{
930 /* Rewind to past frame if needed */
931 if (row < static_cast<int>(context->framecount)) {
932 bool ret = rewind(row);
933 if (!ret) {
934 startHighlight(row, row, 0, columnCount()-1, false);
935 return 0;
936 }
937 }
938
939 QClipboard *clipboard = QGuiApplication::clipboard();
940 std::istringstream inputString(clipboard->text().toStdString());
941
942 std::vector<AllInputs> paste_ais;
943 InputSerialization::readInputs(inputString, paste_ais);
944
945 movie->inputs->insertInputsBefore(paste_ais, row);
946
947 return paste_ais.size();
948}
949
950
951void InputEditorModel::addUniqueInput(const SingleInput &si)

Callers

nothing calls this directly

Calls 3

textMethod · 0.80
insertInputsBeforeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected