| 1870 | } |
| 1871 | |
| 1872 | void 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 | |
| 1888 | void MapEditorController::cut() |
| 1889 | { |