diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-05-17 04:44:51 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-05-17 04:45:59 (GMT) |
commit | 7a738662838763e4828c6ac8957a2823b095f566 (patch) | |
tree | c71e839588363e129fcdc9ff60d1807e07f965f7 /src/declarative | |
parent | a0c9a0feebb571e339c0ea886996f543d2d8c752 (diff) | |
download | Qt-7a738662838763e4828c6ac8957a2823b095f566.zip Qt-7a738662838763e4828c6ac8957a2823b095f566.tar.gz Qt-7a738662838763e4828c6ac8957a2823b095f566.tar.bz2 |
Focus should be applied to focus scopes all the way up the chain, not
just to the closest focus scope parent.
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextedit.cpp | 4 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativetextinput.cpp | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 7f71dd2..45b79a7 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -906,10 +906,8 @@ void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event) if (d->focusOnPress){ QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? while(p) { - if(p->flags() & QGraphicsItem::ItemIsFocusScope){ + if (p->flags() & QGraphicsItem::ItemIsFocusScope) p->setFocus(); - break; - } p = p->parentItem(); } setFocus(true); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index db480b1..8aa7e99 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -889,10 +889,8 @@ void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event) if(d->focusOnPress){ QGraphicsItem *p = parentItem();//###Is there a better way to find my focus scope? while(p) { - if(p->flags() & QGraphicsItem::ItemIsFocusScope){ + if (p->flags() & QGraphicsItem::ItemIsFocusScope) p->setFocus(); - break; - } p = p->parentItem(); } setFocus(true); |