diff options
author | Kalle Viironen <kalle.viironen@digia.com> | 2011-09-15 13:56:31 (GMT) |
---|---|---|
committer | Samuel Rødal <samuel.rodal@nokia.com> | 2011-09-15 13:56:31 (GMT) |
commit | 9463ba63bc7e41a1d6aa320aced392843e31b160 (patch) | |
tree | eb9b897c8d39c8cb9226cf8952eeed6b8cea8cf7 /src | |
parent | ead8dff4884d6081683b8281db69062413950673 (diff) | |
download | Qt-9463ba63bc7e41a1d6aa320aced392843e31b160.zip Qt-9463ba63bc7e41a1d6aa320aced392843e31b160.tar.gz Qt-9463ba63bc7e41a1d6aa320aced392843e31b160.tar.bz2 |
Fix - QGraphicsTextItem in a tab of QTabWidget cannot get focus
Any QGraphicsTextItems in those tabs which are not the first tab of
QTabWidget, cannot get focus although the tab is current tab of
QTabWidget.But the QGraphicsTextItem in the first tab of QTabWidget can
get focus. i.e. a focus frame (dotted box) appears around the
QGraphicsTextItem. Those QGraphicsTextItems which cannot get focus can
get focus only after the main window is minimized and then maximized.
i.e. After that, a focus frame appears around it.
Task-number: QTBUG-19680
Merge-request: 2676
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 1551944..867880c 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -3504,7 +3504,9 @@ bool QGraphicsScene::event(QEvent *event) } break; case QEvent::WindowDeactivate: - if (!--d->activationRefCount) { + if (d->activationRefCount > 0) + --d->activationRefCount; + if (!d->activationRefCount) { if (d->activePanel) { // Deactivate the active panel (but keep it so we can // reactivate it later). |