| 610 | // ---------------------------------------------------------------------------------------- |
| 611 | |
| 612 | void metadata_editor:: |
| 613 | perform_undo() |
| 614 | { |
| 615 | if (!undo_history.empty()) |
| 616 | { |
| 617 | redo_history.push_back(metadata.images[image_pos].boxes); |
| 618 | if (redo_history.size() > MAX_UNDO_HISTORY) |
| 619 | redo_history.erase(redo_history.begin()); |
| 620 | |
| 621 | metadata.images[image_pos].boxes = undo_history.back(); |
| 622 | undo_history.pop_back(); |
| 623 | display.clear_overlay(); |
| 624 | display.add_overlay(get_overlays(metadata.images[image_pos], string_to_color)); |
| 625 | } |
| 626 | } |
| 627 | |
| 628 | // ---------------------------------------------------------------------------------------- |
| 629 |
nothing calls this directly
no test coverage detected