Skip to content

Commit c84a078

Browse files
author
timlinux
committedMar 29, 2006

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed
 

‎src/gui/qgisapp.cpp

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2823,6 +2823,8 @@ void QgisApp::fileSave()
28232823
lastUsedDir, QObject::tr("QGis files (*.qgs)")) );
28242824

28252825
saveFileDialog->setMode(QFileDialog::AnyFile);
2826+
saveFileDialog->setAcceptMode(QFileDialog::AcceptSave);
2827+
saveFileDialog->setConfirmOverwrite( true );
28262828

28272829
if (saveFileDialog->exec() == QDialog::Accepted)
28282830
{
@@ -2845,28 +2847,6 @@ void QgisApp::fileSave()
28452847
fullPath.setFile( newFilePath );
28462848
}
28472849

2848-
// Check to see if the file exists before just blasting it into
2849-
// oblivion; abort saving the project if the user does not want to
2850-
// over-write an existing file.
2851-
2852-
if ( fullPath.exists() )
2853-
{
2854-
if ( QMessageBox::No == QMessageBox::warning( 0x0,
2855-
tr("Project file exists."),
2856-
tr("The given project file exists. Do you wish to over-write it with a new one?"),
2857-
QMessageBox::Yes | QMessageBox::Default,
2858-
QMessageBox::No | QMessageBox::Escape,
2859-
Qt::NoButton ) )
2860-
{
2861-
return; // abort saving the file since the user
2862-
// doesn't want to over-write
2863-
}
2864-
2865-
}
2866-
else
2867-
{
2868-
QgsDebug( " project file does not already exist" );
2869-
}
28702850

28712851
#ifdef QGISDEBUG
28722852
const char* filePathStr = fullPath.filePath().ascii(); // debugger probe

0 commit comments

Comments
 (0)
Please sign in to comment.