From ce56adcf1e77c69d2c47452c46da8cabcd24f12f Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Sat, 26 Jan 2008 00:47:46 +0000 Subject: [PATCH] * Partly reverting r22619 by Bo which broke the loading of documents with graphics like the user guide and the introduction text. I guess this is the intended behaviour. If not (and hence enable should do something even though the mode does not change), it is a bad design IMO. Without this patch some assert was triggered because extract() was called although nothing is embedded. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22676 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/EmbeddedFiles.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/EmbeddedFiles.cpp b/src/EmbeddedFiles.cpp index 727ebd01e8..59e9371015 100644 --- a/src/EmbeddedFiles.cpp +++ b/src/EmbeddedFiles.cpp @@ -112,6 +112,9 @@ void EmbeddedFile::setEmbed(bool embed) void EmbeddedFile::enable(bool flag, Buffer const * buf) { + if (enabled() == flag) + return; + if (flag) { temp_path_ = buf->temppath(); if (!suffixIs(temp_path_, '/'))