mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Embedding: fix enable() logic
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22619 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0387ea1a3d
commit
82dfa33276
@ -112,9 +112,6 @@ void EmbeddedFile::setEmbed(bool embed)
|
|||||||
|
|
||||||
void EmbeddedFile::enable(bool flag, Buffer const * buf)
|
void EmbeddedFile::enable(bool flag, Buffer const * buf)
|
||||||
{
|
{
|
||||||
if (enabled() == flag)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
temp_path_ = buf->temppath();
|
temp_path_ = buf->temppath();
|
||||||
if (!suffixIs(temp_path_, '/'))
|
if (!suffixIs(temp_path_, '/'))
|
||||||
@ -123,7 +120,8 @@ void EmbeddedFile::enable(bool flag, Buffer const * buf)
|
|||||||
if (inzip_name_ != calcInzipName(buf->filePath()))
|
if (inzip_name_ != calcInzipName(buf->filePath()))
|
||||||
syncInzipFile(buf->filePath());
|
syncInzipFile(buf->filePath());
|
||||||
updateFromExternalFile();
|
updateFromExternalFile();
|
||||||
}
|
} else
|
||||||
|
extract();
|
||||||
} else {
|
} else {
|
||||||
extract();
|
extract();
|
||||||
temp_path_ = "";
|
temp_path_ = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user