| 1043 | } |
| 1044 | |
| 1045 | bool 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 | |
| 1077 | void InputEditorModel::columnFactor(int column, double factor) |
| 1078 | { |
no test coverage detected