Skip to content
Permalink
Browse files

[composer] Update number of pages in gui whenever number of pages is …

…changed by multi frame items (sponsored by City of Uster, Switzerland)
  • Loading branch information
nyalldawson committed Apr 28, 2014
1 parent 8b9c9c4 commit 94a547e9f2dc1d2b9466ccdc85d793d71ebdfa49
Showing with 15 additions and 0 deletions.
  1. +13 −0 src/app/composer/qgscompositionwidget.cpp
  2. +2 −0 src/app/composer/qgscompositionwidget.h
@@ -47,6 +47,7 @@ QgsCompositionWidget::QgsCompositionWidget( QWidget* parent, QgsComposition* c )
if ( mComposition )
{
mNumPagesSpinBox->setValue( mComposition->numPages() );
connect( mComposition, SIGNAL( nPagesChanged() ), this, SLOT( setNumberPages() ) );

updatePageStyle();

@@ -431,6 +432,18 @@ void QgsCompositionWidget::setPrintAsRasterCheckBox( bool state )
mPrintAsRasterCheckBox->blockSignals( false );
}

void QgsCompositionWidget::setNumberPages()
{
if ( !mComposition )
{
return;
}

mNumPagesSpinBox->blockSignals( true );
mNumPagesSpinBox->setValue( mComposition->numPages() );
mNumPagesSpinBox->blockSignals( false );
}

void QgsCompositionWidget::displaySnapingSettings()
{
if ( !mComposition )
@@ -64,6 +64,8 @@ class QgsCompositionWidget: public QWidget, private Ui::QgsCompositionWidgetBase
void displayCompositionWidthHeight();
/**Sets Print as raster checkbox value*/
void setPrintAsRasterCheckBox( bool state );
/**Sets number of pages spin box value*/
void setNumberPages();

signals:
/**Is emitted when page orientation changes*/

0 comments on commit 94a547e

Please sign in to comment.
You can’t perform that action at this time.