diff --git a/src/undo/AddUndoAction.cpp b/src/undo/AddUndoAction.cpp index b1a420a8..2a5c1745 100644 --- a/src/undo/AddUndoAction.cpp +++ b/src/undo/AddUndoAction.cpp @@ -116,26 +116,27 @@ string AddUndoAction::getText() PageLayerPosEntry* e = (PageLayerPosEntry*) l->data; if (type != e->element->getType()) { - text += _(" elements"); + text += " "; + text += _("elements"); return text; } } - if (type == ELEMENT_STROKE) + text += " "; + switch(type) { - text += _(" stroke"); - } - else if (type == ELEMENT_TEXT) - { - text += _(" text"); - } - else if (type == ELEMENT_IMAGE) - { - text += _(" image"); - } - else if (type == ELEMENT_TEXIMAGE) - { - text += _(" latex"); + case ELEMENT_STROKE: + text += _(" stroke"); + break; + case ELEMENT_IMAGE: + text += _(" image"); + break; + case ELEMENT_TEXIMAGE: + text += _(" latex"); + break; + case ELEMENT_TEXT: + text += _(" text"); + break; } } }