Skip to content

Commit 8d1e717

Browse files
committed
Add missing parents to message boxes
1 parent eb25ab7 commit 8d1e717

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/layout/qgslayoutdesignerdialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,7 +1304,7 @@ void QgsLayoutDesignerDialog::saveAsTemplate()
13041304
context.setPathResolver( QgsProject::instance()->pathResolver() );
13051305
if ( !currentLayout()->saveAsTemplate( saveFileName, context ) )
13061306
{
1307-
QMessageBox::warning( nullptr, tr( "Save template" ), tr( "Error creating template file." ) );
1307+
QMessageBox::warning( this, tr( "Save template" ), tr( "Error creating template file." ) );
13081308
}
13091309
}
13101310

@@ -1444,7 +1444,7 @@ void QgsLayoutDesignerDialog::exportToRaster()
14441444

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

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

16581658

16591659
case QgsLayoutExporter::MemoryError:
1660-
QMessageBox::warning( nullptr, tr( "Memory Allocation Error" ),
1660+
QMessageBox::warning( this, tr( "Memory Allocation Error" ),
16611661
tr( "Exporting the PDF "
16621662
"resulted in a memory overflow.\n\n"
16631663
"Please try a lower resolution or a smaller paper size." ),

0 commit comments

Comments
 (0)