Skip to content

Commit 198a699

Browse files
author
Hugo Mercier
committed
[Atlas] Restore painting on error return
1 parent 78e2222 commit 198a699

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/app/composer/qgscomposer.cpp

+16-4
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,8 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
664664
e.what(),
665665
QMessageBox::Ok,
666666
QMessageBox::Ok );
667+
mView->setPaintingEnabled( true );
668+
return;
667669
}
668670
if ( atlasOnASingleFile )
669671
{
@@ -696,7 +698,8 @@ void QgsComposer::on_mActionExportAsPDF_triggered()
696698
e.what(),
697699
QMessageBox::Ok,
698700
QMessageBox::Ok );
699-
break;
701+
mView->setPaintingEnabled( true );
702+
return;
700703
}
701704
if ( !atlasOnASingleFile )
702705
{
@@ -773,6 +776,8 @@ void QgsComposer::on_mActionPrint_triggered()
773776
e.what(),
774777
QMessageBox::Ok,
775778
QMessageBox::Ok );
779+
mView->setPaintingEnabled( true );
780+
return;
776781
}
777782
QProgressDialog progress( tr( "Rendering maps..." ), tr( "Abort" ), 0, atlasMap->numFeatures(), this );
778783

@@ -797,7 +802,8 @@ void QgsComposer::on_mActionPrint_triggered()
797802
e.what(),
798803
QMessageBox::Ok,
799804
QMessageBox::Ok );
800-
break;
805+
mView->setPaintingEnabled( true );
806+
return;
801807
}
802808

803809

@@ -966,6 +972,8 @@ void QgsComposer::on_mActionExportAsImage_triggered()
966972
e.what(),
967973
QMessageBox::Ok,
968974
QMessageBox::Ok );
975+
mView->setPaintingEnabled( true );
976+
return;
969977
}
970978

971979
QProgressDialog progress( tr( "Rendering maps..." ), tr( "Abort" ), 0, atlasMap->numFeatures(), this );
@@ -991,7 +999,8 @@ void QgsComposer::on_mActionExportAsImage_triggered()
991999
e.what(),
9921000
QMessageBox::Ok,
9931001
QMessageBox::Ok );
994-
break;
1002+
mView->setPaintingEnabled( true );
1003+
return;
9951004
}
9961005

9971006
QString filename = QDir( dir ).filePath( atlasMap->currentFilename() ) + fileExt;
@@ -1132,6 +1141,8 @@ void QgsComposer::on_mActionExportAsSVG_triggered()
11321141
e.what(),
11331142
QMessageBox::Ok,
11341143
QMessageBox::Ok );
1144+
mView->setPaintingEnabled( true );
1145+
return;
11351146
}
11361147
}
11371148
QProgressDialog progress( tr( "Rendering maps..." ), tr( "Abort" ), 0, atlasMap->numFeatures(), this );
@@ -1161,7 +1172,8 @@ void QgsComposer::on_mActionExportAsSVG_triggered()
11611172
e.what(),
11621173
QMessageBox::Ok,
11631174
QMessageBox::Ok );
1164-
break;
1175+
mView->setPaintingEnabled( true );
1176+
return;
11651177
}
11661178
outputFileName = QDir( outputDir ).filePath( atlasMap->currentFilename() ) + ".svg";
11671179
}

0 commit comments

Comments
 (0)