Feature request #3354
Creating a new project with all layers from current project disabled doesn't show Save/Discard/Cancel message box.
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | nobody - | ||
Category: | Project Loading/Saving | ||
Pull Request or Patch supplied: | Resolution: | fixed | |
Easy fix?: | No | Copied to github as #: | 13414 |
Description
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"
Result:
A new project is created without asking the user if the want to save the previous one, and losing any changes.
History
#1 Updated by JD - almost 14 years ago
Fix:
On line 5623 of app/qgisapp.cpp, replace:
if ( askThem && ( QgsProject::instance()->isDirty() || mMapCanvas->isDirty() ) && mMapCanvas->layerCount() > 0 )
with
if ( askThem && ( QgsProject::instance()->isDirty() || mMapCanvas->isDirty() ) && QgsMapLayerRegistry::instance()->count() > 0 )
#2 Updated by Borys Jurgiel over 13 years ago
- Resolution set to fixed
- Status changed from Open to Closed
Applied in ff3cc637 (SVN r15402). Thanks a lot!