mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
Moving autocomplete code to thread
This commit is contained in:
parent
c2fff61ccd
commit
78234e9468
1 changed files with 5 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
#include <apps/launcher/utils/cellnameloader.hpp>
|
||||
#include <QFileDialog>
|
||||
#include <QCompleter>
|
||||
#include <thread>
|
||||
#include <components/contentselector/view/contentselector.hpp>
|
||||
#include <components/contentselector/model/esmfile.hpp>
|
||||
|
||||
|
@ -166,5 +167,8 @@ void Launcher::AdvancedPage::saveSettingBool(QCheckBox *checkbox, const std::str
|
|||
|
||||
void Launcher::AdvancedPage::slotSelectedDataFilesChanged(QStringList selectedFiles)
|
||||
{
|
||||
loadCellsForAutocomplete(selectedFiles);
|
||||
// Loading cells for core Morrowind + Expansions takes about 0.2 seconds, which is enough to cause a
|
||||
// barely perceptible UI lag. Splitting into its own thread to alleviate that.
|
||||
std::thread loadCellsThread(&AdvancedPage::loadCellsForAutocomplete, this, selectedFiles);
|
||||
loadCellsThread.join();
|
||||
}
|
Loading…
Reference in a new issue