Merge pull request #55782 from elpaso/bugfix-gh55711-rat-dbf-save

RAT: fix save to DBF
This commit is contained in:
Alessandro Pasotti 2024-01-08 13:31:58 +01:00 committed by GitHub
commit 452c344b1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,7 @@ void QgsCreateRasterAttributeTableDialog::accept()
if ( storageIsFile )
{
const QString destinationPath { filePath() };
if ( QFile::exists( destinationPath ) && QMessageBox::warning( nullptr, tr( "Confirm Overwrite" ), tr( "Are you sure you want to overwrite the existing attribute table at '%1'?" ).arg( destinationPath ), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) == QMessageBox::Yes )
if ( ! QFile::exists( destinationPath ) || QMessageBox::warning( nullptr, tr( "Confirm Overwrite" ), tr( "Are you sure you want to overwrite the existing attribute table at '%1'?" ).arg( destinationPath ), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) == QMessageBox::Yes )
{
success = rat->writeToFile( destinationPath, &errorMessage );
if ( ! success )