mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
Update previews on preference change (#9507)
Normally the theBufferList().updatePreviews(); statement would go inside of PrefDisplay::applyRC. However, that would not work well because Buffer::updatePreviews() calls loader() which conditions on (lyxrc.preview == LyXRC::PREVIEW_OFF) but the new RC has not been set at this point.
This commit is contained in:
parent
cf4f79f884
commit
390ae05444
@ -344,6 +344,15 @@ void BufferList::recordCurrentAuthor(Author const & author)
|
||||
}
|
||||
|
||||
|
||||
void BufferList::updatePreviews()
|
||||
{
|
||||
BufferStorage::iterator it = bstore.begin();
|
||||
BufferStorage::iterator end = bstore.end();
|
||||
for (; it != end; ++it)
|
||||
(*it)->updatePreviews();
|
||||
}
|
||||
|
||||
|
||||
int BufferList::bufferNum(FileName const & fname) const
|
||||
{
|
||||
FileNameList const buffers(fileNames());
|
||||
|
@ -115,6 +115,8 @@ public:
|
||||
//@{
|
||||
/// reset current author for all buffers
|
||||
void recordCurrentAuthor(Author const & author);
|
||||
/// update previews for all buffers, e.g. for Prefs update
|
||||
void updatePreviews();
|
||||
/// Call changed() on all buffers, internal or not
|
||||
void changed(bool update_metrics) const;
|
||||
/// emergency save for all buffers
|
||||
|
@ -3456,6 +3456,8 @@ void GuiPreferences::dispatchParams()
|
||||
update_screen_font_ = false;
|
||||
}
|
||||
|
||||
theBufferList().updatePreviews();
|
||||
|
||||
// The Save button has been pressed
|
||||
if (isClosing())
|
||||
dispatch(FuncRequest(LFUN_PREFERENCES_SAVE));
|
||||
|
Loading…
Reference in New Issue
Block a user