MCPcopy Create free account
hub / github.com/davisking/dlib / perform_undo

Method perform_undo

tools/imglab/src/metadata_editor.cpp:612–626  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610// ----------------------------------------------------------------------------------------
611
612void metadata_editor::
613perform_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

Callers

nothing calls this directly

Calls 10

get_overlaysFunction · 0.85
eraseMethod · 0.80
clear_overlayMethod · 0.80
emptyMethod · 0.45
push_backMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
backMethod · 0.45
pop_backMethod · 0.45
add_overlayMethod · 0.45

Tested by

no test coverage detected