Skip to content
Permalink
Browse files
revert 82c66f8
  • Loading branch information
3nids committed Apr 24, 2017
1 parent 3652fa7 commit 68e0a6271650765c373212eed5ceb6338a31a089
Showing with 8 additions and 8 deletions.
  1. +5 −5 src/app/qgisapp.cpp
  2. +2 −2 src/app/qgsmapsavedialog.cpp
  3. +1 −1 src/app/qgsmapsavedialog.h
@@ -5784,20 +5784,20 @@ void QgisApp::updateFilterLegend()
void QgisApp::saveMapAsImage()
{
QList< QgsMapDecoration * > decorations;
QString currentDecorations;
QString activeDecorations;
Q_FOREACH ( QgsDecorationItem *decoration, mDecorationItems )
{
if ( decoration->enabled() )
{
decorations << decoration;
if ( currentDecorations.isEmpty() )
currentDecorations = decoration->name().toLower();
if ( activeDecorations.isEmpty() )
activeDecorations = decoration->name().toLower();
else
currentDecorations += QString( ", %1" ).arg( decoration->name().toLower() );
activeDecorations += QString( ", %1" ).arg( decoration->name().toLower() );
}
}

QgsMapSaveDialog dlg( this, mMapCanvas, currentDecorations );
QgsMapSaveDialog dlg( this, mMapCanvas, activeDecorations );
if ( !dlg.exec() )
return;

@@ -29,7 +29,7 @@

Q_GUI_EXPORT extern int qt_defaultDpiX();

QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, const QString &decorations )
QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, const QString &activeDecorations )
: QDialog( parent )
, mExtent( mapCanvas->mapSettings().visibleExtent() )
, mDpi( mapCanvas->mapSettings().outputDpi() )
@@ -47,7 +47,7 @@ QgsMapSaveDialog::QgsMapSaveDialog( QWidget *parent, QgsMapCanvas *mapCanvas, co
mScaleWidget->setMapCanvas( mapCanvas );
mScaleWidget->setShowCurrentScaleButton( true );

mDrawDecorations->setText( tr( "Draw active decorations: %1" ).arg( !decorations.isEmpty() ? decorations : tr( "none" ) ) );
mDrawDecorations->setText( tr( "Draw active decorations: %1" ).arg( !activeDecorations.isEmpty() ? activeDecorations : tr( "none" ) ) );

connect( mResolutionSpinBox, static_cast < void ( QSpinBox::* )( int ) > ( &QSpinBox::valueChanged ), this, &QgsMapSaveDialog::updateDpi );
connect( mExtentGroupBox, &QgsExtentGroupBox::extentChanged, this, &QgsMapSaveDialog::updateExtent );
@@ -39,7 +39,7 @@ class APP_EXPORT QgsMapSaveDialog: public QDialog, private Ui::QgsMapSaveDialog

/** Constructor for QgsMapSaveDialog
*/
QgsMapSaveDialog( QWidget *parent = nullptr, QgsMapCanvas *mapCanvas = nullptr, const QString &decorations = QString() );
QgsMapSaveDialog( QWidget *parent = nullptr, QgsMapCanvas *mapCanvas = nullptr, const QString &activeDecorations = QString() );

//! returns extent rectangle
QgsRectangle extent() const;

0 comments on commit 68e0a62

Please sign in to comment.