* AddPosesCompleted could be called actually before all the poses were added.

The method was called after _sending_ all the messages, not after receiving
  them all. This fixes the scroll validity check in AddPosesCompleted in list
  mode (bug mentioned in my last commit).

 We can now close #2441, tracker windows should now be completely persistant
with regard to scrolling now, in all modes (spatial mode, single window 
mode in list or icon mode). \o/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28210 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexandre Deckner
2008-10-17 09:52:09 +00:00
parent e85ca56c7d
commit 3704f31d73
+9 -1
View File
@@ -98,6 +98,7 @@ const float kDoubleClickTresh = 6;
const float kCountViewWidth = 62;
const uint32 kAddNewPoses = 'Tanp';
const uint32 kAddPosesCompleted = 'Tapc';
const int32 kMaxAddPosesChunk = 10;
namespace BPrivate {
@@ -1361,6 +1362,10 @@ BPoseView::AddPosesTask(void *castToParams)
if (!count)
break;
}
BMessage finishedSending(kAddPosesCompleted);
lock.Target().SendMessage(&finishedSending);
} catch (failToLock) {
// we are here because the window got closed or otherwise failed to
// lock
@@ -1380,7 +1385,6 @@ BPoseView::AddPosesTask(void *castToParams)
// build attributes menu based on mime types we've added
if (lock.Lock()) {
view->AddPosesCompleted();
#ifdef MSIPL_COMPILE_H
// workaround for broken PPC STL, not needed with the SGI headers for x86
set<thread_id>::iterator i = view->fAddPosesThreads.find(threadID);
@@ -1976,6 +1980,10 @@ BPoseView::MessageReceived(BMessage *message)
break;
}
case kAddPosesCompleted:
AddPosesCompleted();
break;
case kRestoreBackgroundImage:
ContainerWindow()->UpdateBackgroundImage();
break;