Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
revert 82c66f8
  • Loading branch information
3nids committed Apr 24, 2017
1 parent 3652fa7 commit 68e0a62
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/app/qgisapp.cpp
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsmapsavedialog.cpp
Expand Up @@ -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() )
Expand All @@ -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 );
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsmapsavedialog.h
Expand Up @@ -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;
Expand Down

0 comments on commit 68e0a62

Please sign in to comment.