forked from qt-creator/qt-creator
QmlDesigner: Fix issues with Components and Repeaters
- Fixed state preview rendering by deparenting nodes under component wraps. - Ensure state preview image is always clipped to root item. The state preview bounding box broke when Repeater was direct child of root and had delegate with rotation. - Allow dragging items under Repeater to create implicit component. - Allow dragging Components under Repeater. - Do not ask for target property when Component is dragged under any node. - Update nodeSource properly when reparenting implicit component or removing last child of a Component item. - Fixed scene update when last child of a repeater is deleted/moved. Fixes: QDS-5197 Change-Id: Iaaf1745e25db3522ffc1dba7fd1b051da29f5aec Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -150,6 +150,11 @@ bool ServerNodeInstance::holdsGraphical() const
|
||||
return m_nodeInstance->isQuickItem();
|
||||
}
|
||||
|
||||
bool ServerNodeInstance::isComponentWrap() const
|
||||
{
|
||||
return m_nodeInstance->isComponentWrap();
|
||||
}
|
||||
|
||||
void ServerNodeInstance::updateDirtyNodeRecursive()
|
||||
{
|
||||
m_nodeInstance->updateAllDirtyNodesRecursive();
|
||||
@@ -280,6 +285,8 @@ ServerNodeInstance ServerNodeInstance::create(NodeInstanceServer *nodeInstanceSe
|
||||
|
||||
instance.internalInstance()->setInstanceId(instanceContainer.instanceId());
|
||||
|
||||
instance.internalInstance()->setComponentWrap(componentWrap == WrapAsComponent);
|
||||
|
||||
instance.internalInstance()->initialize(instance.m_nodeInstance, instanceContainer.metaFlags());
|
||||
|
||||
// Handle hidden state to initialize pickable state
|
||||
|
||||
Reference in New Issue
Block a user