Fix issues:
+ improve formatting + remove superfluous semicolons + comment unused parameters + rename Initialisation to Initialization + rename Deinitialisation to Finalization + remove spaces
This commit is contained in:
@@ -35,7 +35,6 @@
|
||||
#pragma warning( disable : 4275 )
|
||||
#pragma warning( disable : 4503 )
|
||||
#pragma warning( disable : 4786 ) // specifier longer then 255 chars
|
||||
#pragma warning( disable : 4250 ) // virtual inheritance warning
|
||||
#endif
|
||||
|
||||
// standard
|
||||
|
||||
@@ -310,7 +310,7 @@ public:
|
||||
|
||||
//restoring the object from document: this may itnerest extensions, hence call them
|
||||
virtual void Restore(Base::XMLReader& reader);
|
||||
bool isRestoring() {return testStatus(Gui::isRestoring);};
|
||||
bool isRestoring() {return testStatus(Gui::isRestoring);}
|
||||
|
||||
|
||||
/** @name Display mask modes
|
||||
|
||||
@@ -161,7 +161,7 @@ void ViewProviderDocumentObject::attach(App::DocumentObject *pcObj)
|
||||
{
|
||||
// save Object pointer
|
||||
pcObject = pcObj;
|
||||
|
||||
|
||||
// Retrieve the supported display modes of the view provider
|
||||
aDisplayModesArray = this->getDisplayModes();
|
||||
|
||||
|
||||
@@ -66,4 +66,4 @@ EXTENSION_PROPERTY_SOURCE_TEMPLATE(Gui::ViewProviderExtensionPython, Gui::ViewPr
|
||||
|
||||
// explicit template instantiation
|
||||
template class GuiExport ViewProviderExtensionPythonT<ViewProviderExtension>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,16 +65,16 @@ public:
|
||||
virtual void extensionDropObject(App::DocumentObject*) { }
|
||||
|
||||
/// Hides the view provider
|
||||
virtual void extensionHide(void) { };
|
||||
virtual void extensionHide(void) { }
|
||||
/// Shows the view provider
|
||||
virtual void extensionShow(void) { };
|
||||
virtual void extensionShow(void) { }
|
||||
|
||||
virtual SoSeparator* extensionGetFrontRoot(void) const {return nullptr;}
|
||||
virtual SoGroup* extensionGetChildRoot(void) const {return nullptr;}
|
||||
virtual SoSeparator* extensionGetBackRoot(void) const {return nullptr;}
|
||||
virtual void extensionAttach(App::DocumentObject* pcObject) { };
|
||||
virtual void extensionSetDisplayMode(const char* ModeName) { };
|
||||
virtual std::vector<std::string> extensionGetDisplayModes(void) const {return std::vector<std::string>();};
|
||||
virtual void extensionAttach(App::DocumentObject* pcObject) { }
|
||||
virtual void extensionSetDisplayMode(const char* ModeName) { }
|
||||
virtual std::vector<std::string> extensionGetDisplayModes(void) const {return std::vector<std::string>();}
|
||||
|
||||
//update data of extended opject
|
||||
virtual void extensionUpdateData(const App::Property*);
|
||||
|
||||
@@ -97,4 +97,4 @@ EXTENSION_PROPERTY_SOURCE_TEMPLATE(Gui::ViewProviderGeoFeatureGroupExtensionPyth
|
||||
|
||||
// explicit template instantiation
|
||||
template class GuiExport ViewProviderExtensionPythonT<ViewProviderGeoFeatureGroupExtension>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ bool ViewProviderGroupExtension::extensionCanDragObject(App::DocumentObject*) co
|
||||
}
|
||||
|
||||
void ViewProviderGroupExtension::extensionDragObject(App::DocumentObject* obj) {
|
||||
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.getDocument(\"%s\").getObject(\"%s\").removeObject("
|
||||
"App.getDocument(\"%s\").getObject(\"%s\"))",
|
||||
getExtendedViewProvider()->getObject()->getDocument()->getName(), getExtendedViewProvider()->getObject()->getNameInDocument(),
|
||||
@@ -75,28 +75,27 @@ bool ViewProviderGroupExtension::extensionCanDropObjects() const {
|
||||
}
|
||||
|
||||
bool ViewProviderGroupExtension::extensionCanDropObject(App::DocumentObject* obj) const {
|
||||
|
||||
|
||||
auto* group = getExtendedViewProvider()->getObject()->getExtensionByType<App::GroupExtension>();
|
||||
|
||||
|
||||
//we cannot drop thing of this group into it again
|
||||
if (group->hasObject(obj))
|
||||
return false;
|
||||
|
||||
|
||||
//group into group?
|
||||
if (obj->hasExtension(App::GroupExtension::getExtensionClassTypeId()))
|
||||
if (group->isChildOf(obj->getExtensionByType<App::GroupExtension>()))
|
||||
return false;
|
||||
|
||||
|
||||
//We need to find the correct App extension to ask if this is a supported type, there should only be one
|
||||
if(group->allowObject(obj))
|
||||
return true;
|
||||
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
void ViewProviderGroupExtension::extensionDropObject(App::DocumentObject* obj) {
|
||||
|
||||
|
||||
// Open command
|
||||
App::DocumentObject* grp = static_cast<App::DocumentObject*>(getExtendedViewProvider()->getObject());
|
||||
App::Document* doc = grp->getDocument();
|
||||
@@ -122,27 +121,26 @@ void ViewProviderGroupExtension::extensionDropObject(App::DocumentObject* obj) {
|
||||
.arg(QString::fromLatin1(doc->getName()))
|
||||
.arg(QString::fromLatin1(grp->getNameInDocument()))
|
||||
.arg(QString::fromLatin1(obj->getNameInDocument()));
|
||||
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::App, cmd.toUtf8());
|
||||
|
||||
|
||||
gui->commitCommand();
|
||||
}
|
||||
|
||||
std::vector< App::DocumentObject* > ViewProviderGroupExtension::extensionClaimChildren(void) const {
|
||||
|
||||
|
||||
auto* group = getExtendedViewProvider()->getObject()->getExtensionByType<App::GroupExtension>();
|
||||
|
||||
return std::vector<App::DocumentObject*>(group->Group.getValues());
|
||||
}
|
||||
|
||||
|
||||
void ViewProviderGroupExtension::extensionShow(void) {
|
||||
|
||||
|
||||
// when reading the Visibility property from file then do not hide the
|
||||
// objects of this group because they have stored their visibility status, too
|
||||
if (!getExtendedViewProvider()->isRestoring() && !this->visible) {
|
||||
auto* group = getExtendedViewProvider()->getObject()->getExtensionByType<App::GroupExtension>();
|
||||
|
||||
|
||||
const std::vector<App::DocumentObject*> & links = group->Group.getValues();
|
||||
Gui::Document* doc = Application::Instance->getDocument(group->getExtendedObject()->getDocument());
|
||||
for (std::vector<App::DocumentObject*>::const_iterator it = links.begin(); it != links.end(); ++it) {
|
||||
@@ -157,13 +155,13 @@ void ViewProviderGroupExtension::extensionShow(void) {
|
||||
}
|
||||
|
||||
void ViewProviderGroupExtension::extensionHide(void) {
|
||||
|
||||
|
||||
// when reading the Visibility property from file then do not hide the
|
||||
// objects of this group because they have stored their visibility status, too
|
||||
if (!getExtendedViewProvider()->isRestoring() && this->visible) {
|
||||
|
||||
|
||||
auto* group = getExtendedViewProvider()->getObject()->getExtensionByType<App::GroupExtension>();
|
||||
|
||||
|
||||
const std::vector<App::DocumentObject*> & links = group->Group.getValues();
|
||||
Gui::Document* doc = Application::Instance->getDocument(getExtendedViewProvider()->getObject()->getDocument());
|
||||
for (std::vector<App::DocumentObject*>::const_iterator it = links.begin(); it != links.end(); ++it) {
|
||||
@@ -178,7 +176,7 @@ void ViewProviderGroupExtension::extensionHide(void) {
|
||||
}
|
||||
|
||||
bool ViewProviderGroupExtension::extensionOnDelete(const std::vector< std::string >& vec) {
|
||||
|
||||
|
||||
auto* group = getExtendedViewProvider()->getObject()->getExtensionByType<App::GroupExtension>();
|
||||
// If the group is nonempty ask the user if he wants to delete it's content
|
||||
if ( group->Group.getSize () ) {
|
||||
@@ -203,4 +201,4 @@ EXTENSION_PROPERTY_SOURCE_TEMPLATE(Gui::ViewProviderGroupExtensionPython, Gui::V
|
||||
|
||||
// explicit template instantiation
|
||||
template class GuiExport ViewProviderExtensionPythonT<ViewProviderGroupExtension>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ using namespace Gui;
|
||||
PROPERTY_SOURCE_WITH_EXTENSIONS(Gui::ViewProviderOriginGroup, Gui::ViewProviderDocumentObject)
|
||||
|
||||
ViewProviderOriginGroup::ViewProviderOriginGroup ()
|
||||
{
|
||||
{
|
||||
initExtension(this);
|
||||
}
|
||||
|
||||
ViewProviderOriginGroup::~ViewProviderOriginGroup ()
|
||||
{
|
||||
}
|
||||
{
|
||||
}
|
||||
|
||||
@@ -202,4 +202,4 @@ EXTENSION_PROPERTY_SOURCE_TEMPLATE(Gui::ViewProviderOriginGroupExtensionPython,
|
||||
|
||||
// explicit template instantiation
|
||||
template class GuiExport ViewProviderExtensionPythonT<ViewProviderOriginGroupExtension>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Gui { namespace PropertyEditor {
|
||||
}
|
||||
}
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyItem, Base::BaseClass);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyItem, Base::BaseClass)
|
||||
|
||||
PropertyItem::PropertyItem() : parentItem(0), readonly(false), cleared(false)
|
||||
{
|
||||
@@ -475,7 +475,7 @@ void PropertyItem::bind(const App::Property& prop) {
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyStringItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyStringItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyStringItem::PropertyStringItem()
|
||||
{
|
||||
@@ -521,7 +521,7 @@ QVariant PropertyStringItem::editorData(QWidget *editor) const
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyFontItem::PropertyFontItem()
|
||||
{
|
||||
@@ -571,7 +571,7 @@ QVariant PropertyFontItem::editorData(QWidget *editor) const
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertySeparatorItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertySeparatorItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
QWidget* PropertySeparatorItem::createEditor(QWidget* parent, const QObject* receiver, const char* method) const
|
||||
{
|
||||
@@ -583,7 +583,7 @@ QWidget* PropertySeparatorItem::createEditor(QWidget* parent, const QObject* rec
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyIntegerItem::PropertyIntegerItem()
|
||||
{
|
||||
@@ -650,7 +650,7 @@ QVariant PropertyIntegerItem::toString(const QVariant& v) const {
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyIntegerConstraintItem::PropertyIntegerConstraintItem()
|
||||
{
|
||||
@@ -733,7 +733,7 @@ QVariant PropertyIntegerConstraintItem::toString(const QVariant& v) const {
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyFloatItem::PropertyFloatItem()
|
||||
{
|
||||
@@ -802,7 +802,7 @@ QVariant PropertyFloatItem::editorData(QWidget *editor) const
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyUnitItem::PropertyUnitItem()
|
||||
{
|
||||
@@ -876,7 +876,7 @@ QVariant PropertyUnitItem::editorData(QWidget *editor) const
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyUnitConstraintItem, Gui::PropertyEditor::PropertyUnitItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyUnitConstraintItem, Gui::PropertyEditor::PropertyUnitItem)
|
||||
|
||||
PropertyUnitConstraintItem::PropertyUnitConstraintItem()
|
||||
{
|
||||
@@ -912,7 +912,7 @@ void PropertyUnitConstraintItem::setEditorData(QWidget *editor, const QVariant&
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyFloatConstraintItem::PropertyFloatConstraintItem()
|
||||
{
|
||||
@@ -994,7 +994,7 @@ QVariant PropertyFloatConstraintItem::editorData(QWidget *editor) const
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyAngleItem, Gui::PropertyEditor::PropertyFloatItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyAngleItem, Gui::PropertyEditor::PropertyFloatItem)
|
||||
|
||||
PropertyAngleItem::PropertyAngleItem()
|
||||
{
|
||||
@@ -1036,7 +1036,7 @@ QVariant PropertyAngleItem::toString(const QVariant& prop) const
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyBoolItem::PropertyBoolItem()
|
||||
{
|
||||
@@ -1084,7 +1084,7 @@ QVariant PropertyBoolItem::editorData(QWidget *editor) const
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyVectorItem::PropertyVectorItem()
|
||||
{
|
||||
@@ -1197,7 +1197,7 @@ void PropertyVectorItem::propertyBound() {
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyVectorDistanceItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyVectorDistanceItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyVectorDistanceItem::PropertyVectorDistanceItem()
|
||||
{
|
||||
@@ -1312,7 +1312,7 @@ void PropertyVectorDistanceItem::propertyBound() {
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyMatrixItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyMatrixItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyMatrixItem::PropertyMatrixItem()
|
||||
{
|
||||
@@ -1733,7 +1733,7 @@ void PlacementEditor::updateValue(const QVariant& v, bool incr, bool data)
|
||||
}
|
||||
}
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyPlacementItem::PropertyPlacementItem() : init_axis(false), changed_value(false), rot_angle(0), rot_axis(0,0,1)
|
||||
{
|
||||
@@ -1952,7 +1952,7 @@ void PropertyPlacementItem::propertyBound() {
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyEnumItem::PropertyEnumItem()
|
||||
{
|
||||
@@ -2037,7 +2037,7 @@ QVariant PropertyEnumItem::editorData(QWidget *editor) const
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyStringListItem::PropertyStringListItem()
|
||||
{
|
||||
@@ -2109,7 +2109,7 @@ void PropertyStringListItem::setValue(const QVariant& value)
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFloatListItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFloatListItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyFloatListItem::PropertyFloatListItem()
|
||||
{
|
||||
@@ -2183,7 +2183,7 @@ void PropertyFloatListItem::setValue(const QVariant& value)
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyIntegerListItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyIntegerListItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyIntegerListItem::PropertyIntegerListItem()
|
||||
{
|
||||
@@ -2258,7 +2258,7 @@ void PropertyIntegerListItem::setValue(const QVariant& value)
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyColorItem::PropertyColorItem()
|
||||
{
|
||||
@@ -2345,7 +2345,7 @@ namespace Gui { namespace PropertyEditor {
|
||||
|
||||
Q_DECLARE_METATYPE(Gui::PropertyEditor::Material)
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyMaterialItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyMaterialItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyMaterialItem::PropertyMaterialItem()
|
||||
{
|
||||
@@ -2657,7 +2657,7 @@ QVariant PropertyMaterialItem::editorData(QWidget *editor) const
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyMaterialListItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyMaterialListItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyMaterialListItem::PropertyMaterialListItem()
|
||||
{
|
||||
@@ -3122,7 +3122,7 @@ QVariant PropertyMaterialListItem::editorData(QWidget *editor) const
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyFileItem::PropertyFileItem()
|
||||
{
|
||||
@@ -3173,7 +3173,7 @@ QVariant PropertyFileItem::editorData(QWidget *editor) const
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyPathItem::PropertyPathItem()
|
||||
{
|
||||
@@ -3225,7 +3225,7 @@ QVariant PropertyPathItem::editorData(QWidget *editor) const
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyTransientFileItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyTransientFileItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyTransientFileItem::PropertyTransientFileItem()
|
||||
{
|
||||
@@ -3346,7 +3346,7 @@ void LinkLabel::onLinkActivated (const QString& s)
|
||||
}
|
||||
}
|
||||
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyLinkItem, Gui::PropertyEditor::PropertyItem);
|
||||
TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertyLinkItem, Gui::PropertyEditor::PropertyItem)
|
||||
|
||||
PropertyLinkItem::PropertyLinkItem()
|
||||
{
|
||||
@@ -3376,12 +3376,13 @@ QVariant PropertyLinkItem::value(const App::Property* prop) const
|
||||
// no object assigned
|
||||
// the document name
|
||||
if (c->getTypeId().isDerivedFrom(App::DocumentObject::getClassTypeId())) {
|
||||
App::DocumentObject* obj = static_cast<App::DocumentObject*>(c);
|
||||
App::DocumentObject* obj = static_cast<App::DocumentObject*>(c);
|
||||
list << QString::fromLatin1(obj->getDocument()->getName());
|
||||
}
|
||||
else
|
||||
else {
|
||||
list << QString::fromLatin1("");
|
||||
|
||||
}
|
||||
|
||||
// the internal object name
|
||||
list << QString::fromLatin1("Null");
|
||||
// the object label
|
||||
@@ -3393,8 +3394,9 @@ QVariant PropertyLinkItem::value(const App::Property* prop) const
|
||||
App::DocumentObject* obj = static_cast<App::DocumentObject*>(c);
|
||||
list << QString::fromLatin1(obj->getNameInDocument());
|
||||
}
|
||||
else
|
||||
else {
|
||||
list << QString::fromLatin1("Null");
|
||||
}
|
||||
|
||||
return QVariant(list);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user