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

Method removeUniqueInput

src/program/ui/InputEditorModel.cpp:1045–1075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1043}
1044
1045bool InputEditorModel::removeUniqueInput(int column)
1046{
1047 if (column < COLUMN_SPECIAL_SIZE)
1048 return false;
1049
1050 if (column == columnCount() - 1)
1051 return false;
1052
1053 SingleInput si = movie->editor->input_set[column-COLUMN_SPECIAL_SIZE];
1054
1055 /* Check if the input is set in past frames */
1056 for (unsigned int f = 0; f < context->framecount; f++) {
1057 const AllInputs& ai = movie->inputs->getInputs(f);
1058 if (ai.getInput(si))
1059 return false;
1060 }
1061
1062 /* Clear remaining frames */
1063 movie->inputs->paintInput(si, 0, context->framecount, movie->inputs->nbFrames()-1);
1064
1065 /* Remove clear locked state */
1066 if (movie->editor->locked_inputs.find(si) != movie->editor->locked_inputs.end())
1067 movie->editor->locked_inputs.erase(si);
1068
1069 /* Remove the column */
1070 beginRemoveColumns(QModelIndex(), column, column);
1071 movie->editor->input_set.erase(movie->editor->input_set.begin() + (column-COLUMN_SPECIAL_SIZE));
1072 endRemoveColumns();
1073
1074 return true;
1075}
1076
1077void InputEditorModel::columnFactor(int column, double factor)
1078{

Callers 1

removeInputColumnMethod · 0.80

Calls 6

paintInputMethod · 0.80
nbFramesMethod · 0.80
getInputMethod · 0.45
findMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected