From 54d8957bfeb6f5aac9dacd816af1436198942448 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 11 Jan 2016 11:00:07 +0000 Subject: [PATCH] Only advise to Edit -> Undo if undo stack is not empty. --- src/generate.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/generate.cpp b/src/generate.cpp index 50ebedca..53cca0b3 100644 --- a/src/generate.cpp +++ b/src/generate.cpp @@ -330,11 +330,12 @@ void SolveSpaceUI::GenerateAll(int first, int last, bool andFindFree) { "These include: \n" " %d request%s\n" " %d constraint%s\n" - " %d group%s\n\n" - "Choose Edit -> Undo to undelete all elements.", + " %d group%s" + "%s", deleted.requests, deleted.requests == 1 ? "" : "s", deleted.constraints, deleted.constraints == 1 ? "" : "s", - deleted.groups, deleted.groups == 1 ? "" : "s"); + deleted.groups, deleted.groups == 1 ? "" : "s", + undo.cnt > 0 ? "\n\nChoose Edit -> Undo to undelete all elements." : ""); } deleted = {};