| 130 | } |
| 131 | |
| 132 | void InputChangeLogModel::updateChangeLog() |
| 133 | { |
| 134 | // beginResetModel(); |
| 135 | |
| 136 | /* Disable all items that would need a rewind */ |
| 137 | int currentRow = movie->changelog->index(); |
| 138 | disabledUndoRow = -1; |
| 139 | for (int i = currentRow-1; i >= 0; i--) { |
| 140 | const IMovieAction* action = dynamic_cast<const IMovieAction*>(movie->changelog->command(i)); |
| 141 | if (action->first_frame < context->framecount) { |
| 142 | disabledUndoRow = i; |
| 143 | break; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | disabledRedoRow = 1<<30; |
| 148 | for (int i = currentRow; i < movie->changelog->count(); i++) { |
| 149 | const IMovieAction* action = dynamic_cast<const IMovieAction*>(movie->changelog->command(i)); |
| 150 | if (action->first_frame < context->framecount) { |
| 151 | disabledRedoRow = i+1; |
| 152 | break; |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | // endResetModel(); |
| 157 | } |
| 158 | |
| 159 | void InputChangeLogModel::beginAddHistory(int row) |
| 160 | { |