mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-03 08:28:25 +00:00
Embedding: mark buffer dirty after enable/disable bundling
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20254 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3cdd9376f5
commit
eb04266ab9
@ -67,6 +67,19 @@ void ControlEmbeddedFiles::dispatchMessage(string const & msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void ControlEmbeddedFiles::setEmbedding(bool enable)
|
||||||
|
{
|
||||||
|
if (embeddedFiles().enabled() == enable)
|
||||||
|
return;
|
||||||
|
embeddedFiles().enable(enable);
|
||||||
|
buffer().markDirty();
|
||||||
|
if (enable)
|
||||||
|
dispatchMessage("Stop saving in bundled format.");
|
||||||
|
else
|
||||||
|
dispatchMessage("Save in bundled format.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void ControlEmbeddedFiles::goTo(EmbeddedFile const & item, int idx)
|
void ControlEmbeddedFiles::goTo(EmbeddedFile const & item, int idx)
|
||||||
{
|
{
|
||||||
BOOST_ASSERT(idx < item.refCount());
|
BOOST_ASSERT(idx < item.refCount());
|
||||||
|
@ -44,6 +44,8 @@ public:
|
|||||||
///
|
///
|
||||||
void dispatchParams() {};
|
void dispatchParams() {};
|
||||||
///
|
///
|
||||||
|
void setEmbedding(bool enable);
|
||||||
|
///
|
||||||
void goTo(EmbeddedFile const & item, int idx);
|
void goTo(EmbeddedFile const & item, int idx);
|
||||||
///
|
///
|
||||||
void view(EmbeddedFile const & item);
|
void view(EmbeddedFile const & item);
|
||||||
|
@ -199,13 +199,7 @@ void GuiEmbeddedFilesDialog::on_updatePB_clicked()
|
|||||||
|
|
||||||
void GuiEmbeddedFilesDialog::on_enableCB_toggled(bool enable)
|
void GuiEmbeddedFilesDialog::on_enableCB_toggled(bool enable)
|
||||||
{
|
{
|
||||||
//
|
controller_.setEmbedding(enable);
|
||||||
controller_.embeddedFiles().enable(enable);
|
|
||||||
// immediately post the change to buffer (and bufferView)
|
|
||||||
if (enable)
|
|
||||||
controller_.dispatchMessage("Enable file embedding");
|
|
||||||
else
|
|
||||||
controller_.dispatchMessage("Disable file embedding");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user