Skip to content

Commit a1f1b94

Browse files
committedApr 10, 2014
Merge pull request #1305 from manisandro/save_on_new_from_template
Ask whether to save existing project when creating a new project from a template
2 parents 5f19830 + 25915d7 commit a1f1b94

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎src/app/qgisapp.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3284,6 +3284,11 @@ void QgisApp::fileNew( bool thePromptToSaveFlag, bool forceBlank )
32843284

32853285
bool QgisApp::fileNewFromTemplate( QString fileName )
32863286
{
3287+
if ( !saveDirty() )
3288+
{
3289+
return false; //cancel pressed
3290+
}
3291+
32873292
QgsDebugMsg( QString( "loading project template: %1" ).arg( fileName ) );
32883293
if ( addProject( fileName ) )
32893294
{
@@ -9560,3 +9565,4 @@ LONG WINAPI QgisApp::qgisCrashDump( struct _EXCEPTION_POINTERS *ExceptionInfo )
95609565
return EXCEPTION_EXECUTE_HANDLER;
95619566
}
95629567
#endif
9568+

0 commit comments

Comments
 (0)
Please sign in to comment.