aboutsummaryrefslogtreecommitdiffstats
path: root/plugin/cursornavigation.cpp
diff options
context:
space:
mode:
authorAntti Hölttä <AHoelttae@luxoft.com>2018-12-03 13:44:15 +0100
committerAntti Hölttä <AHoelttae@luxoft.com>2019-03-18 16:33:53 +0100
commita9445c3b9c8f51a229b62c25df1aeebe5c85c88d (patch)
treed431757016a1892135859fae565dfed759ccdeff /plugin/cursornavigation.cpp
parent2d45defe15ca9a94f6eba992af3d544fcd5dfb32 (diff)
Cursor now movable only to items that set the acceptsCursor value to true
Diffstat (limited to 'plugin/cursornavigation.cpp')
-rw-r--r--plugin/cursornavigation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/cursornavigation.cpp b/plugin/cursornavigation.cpp
index e35a939..718a24b 100644
--- a/plugin/cursornavigation.cpp
+++ b/plugin/cursornavigation.cpp
@@ -176,7 +176,7 @@ void CursorNavigation::registerItem(CursorNavigationAttached* item)
QQuickItem *parentItem = item->item()->parentItem();
CursorNavigationAttached *parentCNA=nullptr;
while (parentItem) {
- if ((parentCNA=CursorNavigation::cursorNavigationAttachment(parentItem)))
+ if ((parentCNA=CursorNavigation::cursorNavigationAttachment(parentItem)) && parentCNA->acceptsCursor())
break;
parentItem = parentItem->parentItem();
}
@@ -198,6 +198,8 @@ void CursorNavigation::unregisterItem(CursorNavigationAttached* item)
if (item->m_parentNavigable)
item->m_parentNavigable->m_children.removeOne(item);
+
+ //TODO if the item that is being unregistered has children, they should be reassigned to the item's parent
}
void CursorNavigation::_move(qreal angle, qreal tolerance, bool discrete)