ENABLE_THUMBNAIL_GENERATOR -> Fixed potential race condition when generating thumbnails
This commit is contained in:
parent
47dfe60f0e
commit
f6453aab1b
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue