forked from qt-creator/qt-creator
Deselect all objects when clicking an empty point in the 3D edit view
Task-number: QDS-1124 Change-Id: I5a9ed39a69c467de27dd7c4564d53b7bf033dd92 Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -54,8 +54,7 @@ Window {
|
|||||||
onTapped: {
|
onTapped: {
|
||||||
var pickResult = editView.pick(eventPoint.scenePosition.x,
|
var pickResult = editView.pick(eventPoint.scenePosition.x,
|
||||||
eventPoint.scenePosition.y);
|
eventPoint.scenePosition.y);
|
||||||
if (pickResult.objectHit)
|
viewWindow.objectClicked(pickResult.objectHit);
|
||||||
viewWindow.objectClicked(pickResult.objectHit);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -101,9 +101,10 @@ QObject *Qt5InformationNodeInstanceServer::createEditView3D(QQmlEngine *engine)
|
|||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Qt5InformationNodeInstanceServer::objectClicked(const QVariant &object) {
|
// an object is clicked in the 3D edit view
|
||||||
QObject *item = qobject_cast<QObject *>(object.value<QObject *>());
|
void Qt5InformationNodeInstanceServer::objectClicked(const QVariant &object)
|
||||||
selectInstance(instanceForObject(item));
|
{
|
||||||
|
selectInstance(instanceForObject(object.value<QObject *>()));
|
||||||
}
|
}
|
||||||
|
|
||||||
Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
|
Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :
|
||||||
|
Reference in New Issue
Block a user