mirror of
https://invent.kde.org/graphics/okular
synced 2024-08-27 19:50:27 +00:00
correctly hide the form widgets when a widget is focused
svn path=/trunk/KDE/kdegraphics/okular/; revision=726769
This commit is contained in:
parent
b975359158
commit
7f44aafa94
|
@ -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…
Reference in a new issue