equal
deleted
inserted
replaced
180 |
180 |
181 bool HbPopupLayoutProxy::eventFilter(QObject *obj, QEvent *event) |
181 bool HbPopupLayoutProxy::eventFilter(QObject *obj, QEvent *event) |
182 { |
182 { |
183 Q_UNUSED( obj ); |
183 Q_UNUSED( obj ); |
184 switch( event->type() ) { |
184 switch( event->type() ) { |
185 case QEvent::LayoutRequest: { |
185 case QEvent::LayoutRequest: |
186 updateGeometry(); |
186 case QEvent::ContextMenu: |
187 break; |
187 case QEvent::Close: |
188 } |
188 { |
189 case QEvent::ContextMenu: { |
|
190 updateGeometry(); |
189 updateGeometry(); |
191 break; |
190 break; |
192 } |
191 } |
193 default: |
192 default: |
194 break; |
193 break; |
195 } |
194 } |
196 return false; |
195 return false; |
197 } |
196 } |
491 else if (initialFocusedItem && scene && |
490 else if (initialFocusedItem && scene && |
492 scene->items().contains(initialFocusedItem)) { |
491 scene->items().contains(initialFocusedItem)) { |
493 |
492 |
494 // Move the focus to the initial focus item if there is no current focus item or |
493 // Move the focus to the initial focus item if there is no current focus item or |
495 // the ancestor of the current fucus item is popup |
494 // the ancestor of the current fucus item is popup |
496 if( !scene->focusItem() || popup->hasFocus() || popup->isAncestorOf(scene->focusItem())) { |
495 if( !scene->focusItem() || scene->focusItem() == popup || |
|
496 popup->isAncestorOf(scene->focusItem())) { |
497 initialFocusedItem->setFocus(); |
497 initialFocusedItem->setFocus(); |
498 initialFocusedItem = 0; |
498 initialFocusedItem = 0; |
499 } |
499 } |
500 } |
500 } |
501 } |
501 } |