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

Method updateChangeLog

src/program/ui/InputChangeLogModel.cpp:132–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132void 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
159void InputChangeLogModel::beginAddHistory(int row)
160{

Callers 1

updateMethod · 0.80

Calls 1

indexMethod · 0.80

Tested by

no test coverage detected