correctly hide the form widgets when a widget is focused

svn path=/trunk/KDE/kdegraphics/okular/; revision=726769
remotes/origin/KDE/4.0
Pino Toscano 19 years ago
parent b975359158
commit 7f44aafa94
  1. 3
      ui/pageview.cpp
  2. 5
      ui/pageviewutils.cpp

@ -2489,7 +2489,8 @@ void PageView::toggleFormWidgets( bool on )
QVector< PageViewItem * >::const_iterator dIt = d->items.begin(), dEnd = d->items.end();
for ( ; dIt != dEnd; ++dIt )
{
somehadfocus = somehadfocus || (*dIt)->setFormWidgetsVisible( on );
bool hadfocus = (*dIt)->setFormWidgetsVisible( on );
somehadfocus = somehadfocus || hadfocus;
}
if ( somehadfocus )
setFocus();

@ -123,7 +123,10 @@ bool PageViewItem::setFormWidgetsVisible( bool visible )
bool somehadfocus = false;
QHash<QString, FormWidgetIface*>::iterator it = m_formWidgets.begin(), itEnd = m_formWidgets.end();
for ( ; it != itEnd; ++it )
somehadfocus = somehadfocus || (*it)->setVisibility( visible );
{
bool hadfocus = (*it)->setVisibility( visible );
somehadfocus = somehadfocus || hadfocus;
}
return somehadfocus;
}

Loading…
Cancel
Save