Feature request #3354

Creating a new project with all layers from current project disabled doesn't show Save/Discard/Cancel message box.

Added by JD - almost 13 years ago. Updated over 12 years ago.

Assignee:nobody -
Category:Project Loading/Saving
Pull Request or Patch supplied: Resolution:fixed
Easy fix?:No Copied to github as #:13414


Steps to reproduce:
1) Create a new project
2) Add a vector or raster file to the TOC
3) Disable all layers in the TOC
4) Select "New Project"

A new project is created without asking the user if the want to save the previous one, and losing any changes.


#1 Updated by JD - almost 13 years ago

On line 5623 of app/qgisapp.cpp, replace:
if ( askThem && ( QgsProject::instance()->isDirty() || mMapCanvas->isDirty() ) && mMapCanvas->layerCount() > 0 )


if ( askThem && ( QgsProject::instance()->isDirty() || mMapCanvas->isDirty() ) && QgsMapLayerRegistry::instance()->count() > 0 )

#2 Updated by Borys Jurgiel over 12 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Applied in ff3cc637 (SVN r15402). Thanks a lot!

Also available in: Atom PDF