Commit 1f4c40a9 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Hide the resize handles if a item has wh bindings

Change-Id: I489be5fe38cef88aed34f2ea3aeb8245b29be217
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 3e6fcd60
......@@ -66,18 +66,22 @@ void ResizeIndicator::clear()
m_itemControllerHash.clear();
}
bool itemIsResizable(const QmlItemNode &qmlItemNode)
{
return qmlItemNode.isValid()
&& qmlItemNode.instanceIsResizable()
&& qmlItemNode.modelIsMovable()
&& qmlItemNode.modelIsResizable()
&& !qmlItemNode.instanceHasRotationTransform()
&& !qmlItemNode.instanceIsInLayoutable();
}
void ResizeIndicator::setItems(const QList<FormEditorItem*> &itemList)
{
clear();
foreach (FormEditorItem* item, itemList) {
if (item
&& item->qmlItemNode().isValid()
&& item->qmlItemNode().instanceIsResizable()
&& item->qmlItemNode().modelIsMovable()
&& item->qmlItemNode().modelIsResizable()
&& !item->qmlItemNode().instanceHasRotationTransform()
&& !item->qmlItemNode().instanceIsInLayoutable()) {
if (item && itemIsResizable(item->qmlItemNode())) {
ResizeController controller(m_layerItem, item);
m_itemControllerHash.insert(item, controller);
}
......@@ -88,7 +92,7 @@ void ResizeIndicator::updateItems(const QList<FormEditorItem*> &itemList)
{
foreach (FormEditorItem* item, itemList) {
if (m_itemControllerHash.contains(item)) {
if (item->qmlItemNode().instanceHasRotationTransform()) {
if (!item || !itemIsResizable(item->qmlItemNode())) {
m_itemControllerHash.take(item);
} else {
ResizeController controller(m_itemControllerHash.value(item));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment