From 358745d0e36c35d906c99e3d41f467bf499ce0ca Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Wed, 11 Nov 2015 18:06:07 -0500 Subject: [PATCH] Revert "Update previews on preference change (#9507)" The referenced commit lead to performance issues and possibly crashes in some cases when saving preferences. Thanks to Guillaume for discovering the issues. See #9828 for more discussion. I hope to come up with a better fix for #9507. This reverts commit 390ae05444cf4899a3028dcbbfe1095ecd2d207a. --- src/BufferList.cpp | 9 --------- src/BufferList.h | 2 -- src/frontends/qt4/GuiPrefs.cpp | 2 -- 3 files changed, 13 deletions(-) diff --git a/src/BufferList.cpp b/src/BufferList.cpp index 68a1e808cb..c253282b79 100644 --- a/src/BufferList.cpp +++ b/src/BufferList.cpp @@ -344,15 +344,6 @@ 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()); diff --git a/src/BufferList.h b/src/BufferList.h index 242eff03be..4f9cb95c05 100644 --- a/src/BufferList.h +++ b/src/BufferList.h @@ -115,8 +115,6 @@ 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 diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index f7c00f45bf..a076402721 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -3371,8 +3371,6 @@ void GuiPreferences::dispatchParams() update_screen_font_ = false; } - theBufferList().updatePreviews(); - // The Save button has been pressed if (isClosing()) dispatch(FuncRequest(LFUN_PREFERENCES_SAVE)); -- 2.39.2