Skip to content

Commit

Permalink
show information messagebox when metadata saved to the default location
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy authored and nyalldawson committed Jul 17, 2024
1 parent a7bad33 commit aa10613
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/qgslayerpropertiesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,17 @@ void QgsLayerPropertiesDialog::saveMetadataAsDefault()
mMetadataWidget->acceptMetadata();

bool defaultSavedFlag = false;
const QString infoWindowTitle = QObject::tr( "Save default metadata" );
const QString errorMsg = mLayer->saveDefaultMetadata( defaultSavedFlag );
if ( !defaultSavedFlag )
{
QMessageBox::warning( this, tr( "Default Metadata" ), errorMsg );
QMessageBox::warning( this, infoWindowTitle, errorMsg );
refocusDialog();
}
else
{
QMessageBox::information( this, infoWindowTitle, tr( "Metadata saved." ) );
}
}

void QgsLayerPropertiesDialog::loadDefaultMetadata()
Expand Down

0 comments on commit aa10613

Please sign in to comment.