forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.11'
Change-Id: Ieb0bb1ebab9a5efb42d15bbeac2cd4c46a6de962
This commit is contained in:
@@ -571,11 +571,30 @@ QVariant ObjectNodeInstance::property(const PropertyName &name) const
|
||||
return property.read();
|
||||
}
|
||||
|
||||
void ObjectNodeInstance::ensureVector3DDotProperties(PropertyNameList &list) const
|
||||
{
|
||||
const PropertyNameList properties = { "rotation", "scale", "pivot" };
|
||||
for (const auto &property : properties) {
|
||||
if (list.contains(property) && instanceType(property) == "QVector3D") {
|
||||
const PropertyNameList dotProperties = { "x", "y", "z" };
|
||||
for (const auto &dotProperty : dotProperties) {
|
||||
const PropertyName dotPropertyName = property + "." + dotProperty;
|
||||
if (!list.contains(dotPropertyName))
|
||||
list.append(dotPropertyName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PropertyNameList ObjectNodeInstance::propertyNames() const
|
||||
{
|
||||
PropertyNameList list;
|
||||
if (isValid())
|
||||
return QmlPrivateGate::allPropertyNames(object());
|
||||
return PropertyNameList();
|
||||
list = QmlPrivateGate::allPropertyNames(object());
|
||||
|
||||
ensureVector3DDotProperties(list);
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
QString ObjectNodeInstance::instanceType(const PropertyName &name) const
|
||||
|
||||
@@ -209,6 +209,7 @@ protected:
|
||||
static QVariant enumationValue(const Enumeration &enumeration);
|
||||
|
||||
void initializePropertyWatcher(const ObjectNodeInstance::Pointer &objectNodeInstance);
|
||||
void ensureVector3DDotProperties(PropertyNameList &list) const;
|
||||
private:
|
||||
QString m_id;
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
#include "removesharedmemorycommand.h"
|
||||
#include "objectnodeinstance.h"
|
||||
#include "drop3dlibraryitemcommand.h"
|
||||
#include "view3dclosedcommand.h"
|
||||
|
||||
#include "dummycontextobject.h"
|
||||
#include "../editor3d/generalhelper.h"
|
||||
@@ -97,6 +98,10 @@ bool Qt5InformationNodeInstanceServer::eventFilter(QObject *, QEvent *event)
|
||||
|
||||
} break;
|
||||
|
||||
case QEvent::Close: {
|
||||
nodeInstanceClient()->view3DClosed(View3DClosedCommand());
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user