diff options
-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); |