diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2019-10-30 12:09:58 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2019-10-30 12:09:58 +0300 |
commit | f6453aab1b1569fd5ac7df02232ff4dff37159a7 (patch) | |
tree | e3453a4649663276d53cb291eb7901058c02d94d /src | |
parent | 47dfe60f0ea8c5df682ebb5398ab83a7ff485dd9 (diff) |
ENABLE_THUMBNAIL_GENERATOR -> Fixed potential race condition when generating thumbnails
Diffstat (limited to 'src')
-rw-r--r-- | src/libslic3r/GCode.cpp | 1 | ||||
-rw-r--r-- | src/slic3r/GUI/Plater.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 92f733787..ebb82cfb2 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -971,6 +971,7 @@ void GCode::_do_export(Print &print, FILE *file) _write(file, "; thumbnail end\n;\n\n"); } + print.throw_if_canceled(); } } #endif // ENABLE_THUMBNAIL_GENERATOR diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index f56d6fc27..464093712 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3046,7 +3046,8 @@ bool Plater::priv::restart_background_process(unsigned int state) (state & UPDATE_BACKGROUND_PROCESS_FORCE_EXPORT) != 0 || (state & UPDATE_BACKGROUND_PROCESS_RESTART) != 0 ) ) { #if ENABLE_THUMBNAIL_GENERATOR - if ((state & UPDATE_BACKGROUND_PROCESS_FORCE_EXPORT) == 0) + if (((state & UPDATE_BACKGROUND_PROCESS_FORCE_EXPORT) == 0) && + (this->background_process.state() != BackgroundSlicingProcess::STATE_RUNNING)) { // update thumbnail data if (this->printer_technology == ptFFF) |