MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / doUndo

Method doUndo

src/gui/map/map_editor.cpp:1872–1886  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1870}
1871
1872void MapEditorController::doUndo(bool redo)
1873{
1874 if ((!redo && !map->undoManager().canUndo()) ||
1875 (redo && !map->undoManager().canRedo()))
1876 {
1877 // This should not happen as the action should be deactivated in this case!
1878 QMessageBox::critical(window, tr("Error"), tr("No undo steps available."));
1879 return;
1880 }
1881
1882 if (redo)
1883 map->undoManager().redo(window);
1884 else
1885 map->undoManager().undo(window);
1886}
1887
1888void MapEditorController::cut()
1889{

Callers

nothing calls this directly

Calls 4

canUndoMethod · 0.80
canRedoMethod · 0.80
redoMethod · 0.45
undoMethod · 0.45

Tested by

no test coverage detected