Skip to content

Commit

Permalink
Add missing parents to message boxes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 17, 2017
1 parent eb25ab7 commit 8d1e717
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/app/layout/qgslayoutdesignerdialog.cpp
Expand Up @@ -1304,7 +1304,7 @@ void QgsLayoutDesignerDialog::saveAsTemplate()
context.setPathResolver( QgsProject::instance()->pathResolver() );
if ( !currentLayout()->saveAsTemplate( saveFileName, context ) )
{
QMessageBox::warning( nullptr, tr( "Save template" ), tr( "Error creating template file." ) );
QMessageBox::warning( this, tr( "Save template" ), tr( "Error creating template file." ) );
}
}

Expand Down Expand Up @@ -1444,7 +1444,7 @@ void QgsLayoutDesignerDialog::exportToRaster()

if ( memuse > 400 ) // about 4500x4500
{
int answer = QMessageBox::warning( nullptr, tr( "Export layout" ),
int answer = QMessageBox::warning( this, tr( "Export layout" ),
tr( "To create an image of %1x%2 requires about %3 MB of memory. Proceed?" )
.arg( width ).arg( height ).arg( memuse ),
QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Ok );
Expand Down Expand Up @@ -1548,7 +1548,7 @@ void QgsLayoutDesignerDialog::exportToRaster()
break;

case QgsLayoutExporter::MemoryError:
QMessageBox::warning( nullptr, tr( "Memory Allocation Error" ),
QMessageBox::warning( this, tr( "Memory Allocation Error" ),
tr( "Trying to create image %1 (%2×%3 @ %4dpi ) "
"resulted in a memory overflow.\n\n"
"Please try a lower resolution or a smaller paper size." )
Expand Down Expand Up @@ -1657,7 +1657,7 @@ void QgsLayoutDesignerDialog::exportToPdf()


case QgsLayoutExporter::MemoryError:
QMessageBox::warning( nullptr, tr( "Memory Allocation Error" ),
QMessageBox::warning( this, tr( "Memory Allocation Error" ),
tr( "Exporting the PDF "
"resulted in a memory overflow.\n\n"
"Please try a lower resolution or a smaller paper size." ),
Expand Down

0 comments on commit 8d1e717

Please sign in to comment.