Commit 39fb1ef5 authored by Pino Toscano's avatar Pino Toscano

correctly show/hide the form widgets in each page correctly even when not in Continuous mode

svn path=/trunk/KDE/kdegraphics/okular/; revision=755275
parent 975b5e55
......@@ -710,7 +710,7 @@ void PageView::notifySetup( const QVector< Okular::Page * > & pageSet, int setup
{
w->setPageItem( item );
w->setFormWidgetsController( d->formWidgetsController() );
w->setVisibility( d->m_formsVisible );
w->setVisibility( false );
w->setCanBeFilled( d->document->isAllowed( Okular::AllowFillForms ) );
item->formWidgets().insert( ff->name(), w );
hasformwidgets = true;
......@@ -2671,6 +2671,7 @@ void PageView::slotRelayoutPages()
item->moveTo( 0, 0 );
item->setVisible( false );
}
item->setFormWidgetsVisible( d->m_formsVisible );
// advance col/row index
insertX += cWidth;
if ( ++cIdx == nCols )
......
......@@ -39,7 +39,8 @@
/*********************/
PageViewItem::PageViewItem( const Okular::Page * page )
: m_page( page ), m_zoomFactor( 1.0 ), m_visible( true )
: m_page( page ), m_zoomFactor( 1.0 ), m_visible( true ),
m_formsVisible( false )
{
}
......@@ -121,6 +122,7 @@ void PageViewItem::moveTo( int x, int y )
void PageViewItem::setVisible( bool visible )
{
setFormWidgetsVisible( visible && m_formsVisible );
m_visible = visible;
}
......@@ -131,6 +133,11 @@ void PageViewItem::invalidate()
bool PageViewItem::setFormWidgetsVisible( bool visible )
{
m_formsVisible = visible;
if ( !m_visible )
return false;
bool somehadfocus = false;
QHash<QString, FormWidgetIface*>::iterator it = m_formWidgets.begin(), itEnd = m_formWidgets.end();
for ( ; it != itEnd; ++it )
......
......@@ -60,6 +60,7 @@ class PageViewItem
double m_zoomFactor;
QRect m_geometry;
bool m_visible;
bool m_formsVisible;
QHash<QString, FormWidgetIface*> m_formWidgets;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment