From 51fce57c7819dc5e8997922038fb69738b9858ac Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 12 Apr 2010 15:15:35 +0000 Subject: [PATCH] A compromise suggested by JMarc: We mark the buffer dirty if, but only if, the filename was not automatically generated. So, if the user chose the filename, we assume she wants to keep the file. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34119 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/buffer_funcs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/buffer_funcs.cpp b/src/buffer_funcs.cpp index dc51c93835..7e90af60d2 100644 --- a/src/buffer_funcs.cpp +++ b/src/buffer_funcs.cpp @@ -146,7 +146,8 @@ Buffer * newFile(string const & filename, string const & templatename, if (!isNamed) { b->setUnnamed(); b->setFileName(filename); - } + } else + b->markDirty(); b->setReadonly(false); b->setFullyLoaded(true);