Display <empty> as custom name if an empty string is set.

* In cases where the API doesn't consider an empty string to be ignored.
This commit is contained in:
baldurk
2018-08-03 16:08:43 +01:00
parent 9f7304c780
commit f36701779c
+2 -4
View File
@@ -267,10 +267,8 @@ typically it is one parent to many derived.
DOCUMENT("Utility function for setting up a custom name to overwrite the auto-generated one.");
inline void SetCustomName(const rdcstr &givenName)
{
// consider an empty name to be un-setting any previous set name, and revert to the
// auto-generated name.
autogeneratedName = !givenName.isEmpty();
name = givenName;
autogeneratedName = false;
name = givenName.isEmpty() ? "<empty>" : givenName;
}
};