diff options
Diffstat (limited to 'src/gui/preview/PreviewModel.cpp')
| -rw-r--r-- | src/gui/preview/PreviewModel.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gui/preview/PreviewModel.cpp b/src/gui/preview/PreviewModel.cpp index 88b281b..6776445 100644 --- a/src/gui/preview/PreviewModel.cpp +++ b/src/gui/preview/PreviewModel.cpp @@ -139,13 +139,16 @@ void PreviewModel::UpdateSave(int saveID, int saveDate) pthread_create(&updateSaveInfoThread, 0, &PreviewModel::updateSaveInfoT, updateSaveInfoInfo); } - if (!updateSaveCommentsInfo) - updateSaveCommentsInfo = new threadInfo(saveID, commentsPageNumber); - if (updateSaveCommentsInfo->threadFinished) + if (!GetDoOpen()) { - commentsLoaded = false; - updateSaveCommentsInfo->threadFinished = false; - pthread_create(&updateSaveCommentsThread, 0, &PreviewModel::updateSaveCommentsT, updateSaveCommentsInfo); + if (!updateSaveCommentsInfo) + updateSaveCommentsInfo = new threadInfo(saveID, commentsPageNumber); + if (updateSaveCommentsInfo->threadFinished) + { + commentsLoaded = false; + updateSaveCommentsInfo->threadFinished = false; + pthread_create(&updateSaveCommentsThread, 0, &PreviewModel::updateSaveCommentsT, updateSaveCommentsInfo); + } } } |
