Skip to content
Permalink
Browse files

Fix bug with File -> Save Project where file dialog shows 'Open' inst…

…ead of 'Save'

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5108 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Mar 29, 2006
1 parent 3a1e26c commit c84a0784a64e213d90b3642a0303f0bf2cd61c37
Showing with 2 additions and 22 deletions.
  1. +2 −22 src/gui/qgisapp.cpp
@@ -2823,6 +2823,8 @@ void QgisApp::fileSave()
lastUsedDir, QObject::tr("QGis files (*.qgs)")) );

saveFileDialog->setMode(QFileDialog::AnyFile);
saveFileDialog->setAcceptMode(QFileDialog::AcceptSave);
saveFileDialog->setConfirmOverwrite( true );

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

// Check to see if the file exists before just blasting it into
// oblivion; abort saving the project if the user does not want to
// over-write an existing file.

if ( fullPath.exists() )
{
if ( QMessageBox::No == QMessageBox::warning( 0x0,
tr("Project file exists."),
tr("The given project file exists. Do you wish to over-write it with a new one?"),
QMessageBox::Yes | QMessageBox::Default,
QMessageBox::No | QMessageBox::Escape,
Qt::NoButton ) )
{
return; // abort saving the file since the user
// doesn't want to over-write
}

}
else
{
QgsDebug( " project file does not already exist" );
}

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

0 comments on commit c84a078

Please sign in to comment.
You can’t perform that action at this time.