Internal cleanup filebrowser threading; see issue #599

This commit is contained in:
Oliver Duis
2011-03-27 22:19:20 +02:00
parent 46183e33b3
commit 630da7d550
4 changed files with 126 additions and 3 deletions

View File

@@ -276,8 +276,13 @@ void Thumbnail::decreaseRef ()
}
void Thumbnail::getThumbnailSize (int &w, int &h) {
// TODO: Check for Linux
#ifdef WIN32
Glib::Mutex::Lock lock(mutex);
#endif
w=0;
if (tpp) w = tpp->getImageWidth (getProcParams(), h); // this might return 0 if image was just building
if (!initial_ && tpp) w = tpp->getImageWidth (getProcParams(), h); // this might return 0 if image was just building
if (w==0) w = tw * h / th;
}