#3325: DlgPropertyLink as editor of Tip property

This commit is contained in:
wmayer
2018-01-28 22:37:03 +01:00
parent 5d1fb6937e
commit f9b04b1551
4 changed files with 53 additions and 6 deletions

View File

@@ -3493,7 +3493,8 @@ QVariant PropertyLinkItem::value(const App::Property* prop) const
const App::PropertyLink* prop_link = static_cast<const App::PropertyLink*>(prop);
App::PropertyContainer* c = prop_link->getContainer();
// the list has four elements: [document name, internal name, label, internal name of container]
// the list has five elements:
// [document name, internal name, label, internal name of container, property name]
App::DocumentObject* obj = prop_link->getValue();
QStringList list;
if (obj) {
@@ -3527,6 +3528,8 @@ QVariant PropertyLinkItem::value(const App::Property* prop) const
list << QString::fromLatin1("Null");
}
list << QString::fromLatin1(prop->getName());
return QVariant(list);
}
@@ -3675,7 +3678,8 @@ QVariant PropertyLinkListItem::value(const App::Property* prop) const
objName = QString::fromLatin1("Null");
}
// each item is a list of four elements: [document name, internal name, label, internal name of container]
// each item is a list of five elements:
//[document name, internal name, label, internal name of container, property name]
// the variant list contains at least one item
std::vector<App::DocumentObject*> obj = prop_link->getValues();
QVariantList varList;
@@ -3686,6 +3690,7 @@ QVariant PropertyLinkListItem::value(const App::Property* prop) const
list << QString::fromLatin1((*it)->getNameInDocument());
list << QString::fromUtf8((*it)->Label.getValue());
list << objName;
list << QString::fromLatin1(prop->getName());
varList << list;
}
}
@@ -3706,6 +3711,7 @@ QVariant PropertyLinkListItem::value(const App::Property* prop) const
// the object label
list << QString::fromLatin1("");
list << objName;
list << QString::fromLatin1(prop->getName());
varList << list;
}