diff --git a/src/tiled/changeproperties.cpp b/src/tiled/changeproperties.cpp index 613c3022ec..d95a9de242 100644 --- a/src/tiled/changeproperties.cpp +++ b/src/tiled/changeproperties.cpp @@ -34,7 +34,7 @@ ChangeClassName::ChangeClassName(Document *document, QUndoCommand *parent) : ChangeValue(document, objects, className, parent) { - setText(QCoreApplication::translate("Undo Commands", "Change Type")); + setText(QCoreApplication::translate("Undo Commands", "Change Class")); } void ChangeClassName::undo() @@ -146,10 +146,12 @@ SetProperty::SetProperty(Document *document, mProperties.append(prop); } + const auto fullName = mPath.join(QLatin1Char('.')); + if (mObjects.size() > 1 || mObjects.at(0)->hasProperty(mName)) - setText(QCoreApplication::translate("Undo Commands", "Set Property")); + setText(QCoreApplication::translate("Undo Commands", "Set Property '%1'").arg(fullName)); else - setText(QCoreApplication::translate("Undo Commands", "Add Property")); + setText(QCoreApplication::translate("Undo Commands", "Add Property '%1'").arg(fullName)); } void SetProperty::undo() @@ -201,7 +203,7 @@ RemoveProperty::RemoveProperty(Document *document, for (Object *obj : objects) mPreviousValues.append(obj->property(mName)); - setText(QCoreApplication::translate("Undo Commands", "Remove Property")); + setText(QCoreApplication::translate("Undo Commands", "Remove Property '%1'").arg(name)); } void RemoveProperty::undo()