App: DocumentObject - New full label member function
==================================================== Before this commit there is a function getFullName(), which produces a string in the form document#objectname. For "document" the real name of the document is taken, whereas for objectname it is the initial name (Sketch, Sketch001), not the label. The new function fo this commit, getFullLabel(), provides a string documentlabel#documentobjectlabel, that are probably easier to identify for end users.
This commit is contained in:
committed by
abdullahtahiriyo
parent
bb1b61dac9
commit
7643c35c3f
@@ -282,6 +282,16 @@ std::string DocumentObject::getFullName() const {
|
||||
return name;
|
||||
}
|
||||
|
||||
std::string DocumentObject::getFullLabel() const {
|
||||
if(!getDocument())
|
||||
return "?";
|
||||
|
||||
auto name = getDocument()->Label.getStrValue();
|
||||
name += "#";
|
||||
name += Label.getStrValue();
|
||||
return name;
|
||||
}
|
||||
|
||||
const char *DocumentObject::getNameInDocument() const
|
||||
{
|
||||
// Note: It can happen that we query the internal name of an object even if it is not
|
||||
|
||||
Reference in New Issue
Block a user