Opened 13 years ago

Closed 13 years ago

#3354 closed patch (fixed)

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

Reported by: JD Owned by: nobody
Priority: minor: annoyance Milestone: Version 1.7.0
Component: Project Loading / Saving Version: Trunk
Keywords: Cc:
Must Fix for Release: No Platform: Linux
Platform Version: Awaiting user input: no

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.

Change History (3)

comment:1 by JD, 13 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 )

comment:2 by lutra, 13 years ago

Type: bugpatch

comment:3 by borysiasty, 13 years ago

Resolution: fixed
Status: newclosed

Applied in r15401. Thanks a lot!

Note: See TracTickets for help on using tickets.