-Fix problem of order of import plugins, closes #26340

-Ensure resource previewer does not start until first import is done
This commit is contained in:
Juan Linietsky
2019-02-27 13:31:11 -03:00
parent ce615c1a82
commit a5370b1b1b
5 changed files with 15 additions and 5 deletions

View File

@ -417,6 +417,10 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) {
}
}
void EditorResourcePreview::start() {
ERR_FAIL_COND(thread);
thread = Thread::create(_thread_func, this);
}
void EditorResourcePreview::stop() {
if (thread) {
exit = true;
@ -428,13 +432,12 @@ void EditorResourcePreview::stop() {
}
EditorResourcePreview::EditorResourcePreview() {
thread = NULL;
singleton = this;
preview_mutex = Mutex::create();
preview_sem = Semaphore::create();
order = 0;
exit = false;
thread = Thread::create(_thread_func, this);
}
EditorResourcePreview::~EditorResourcePreview() {