Ticket #4322: tracker.4322.patch

File tracker.4322.patch, 1.8 KB (added by anevilyak, 14 years ago)

Debugging patch

  • src/kits/tracker/PoseView.cpp

     
    35643564    // search only nearby poses (vertically)
    35653565    int32 index = FirstIndexAtOrBelow((int32)(poseRect.top - IconPoseHeight()));
    35663566    int32 numPoses = fVSPoseList->CountItems();
     3567   
     3568    printf("SlotOccupied: index %ld, numPoses: %ld\n", index, numPoses);
    35673569
    35683570    while (index < numPoses && fVSPoseList->ItemAt(index)->Location(this).y
    35693571        < poseRect.bottom) {
     3572        printf("Checking index %ld\n", index);
    35703573
    35713574        BRect rect(fVSPoseList->ItemAt(index)->CalcRect(this));
    35723575        if (poseRect.Intersects(rect))
  • src/kits/tracker/Pose.cpp

     
    744744BTextWidget *
    745745BPose::WidgetFor(uint32 attr, int32 *index) const
    746746{
     747    printf("WidgetFor(%lu, %p)\n", attr, index);
    747748    int32 count = fWidgetList.CountItems();
     749    printf("Widget count: %ld\n", count);
    748750    for (int32 i = 0; i < count; i++) {
    749751        BTextWidget *widget = fWidgetList.ItemAt(i);
     752        printf("Widget %ld: %p\n", i, widget);
    750753        if (widget->AttrHash() == attr) {
    751754            if (index)
    752755                *index = i;
     
    914917BRect
    915918BPose::CalcRect(const BPoseView *poseView) const
    916919{
     920    printf("BPose::CalcRect(%p), this: %p\n", poseView, this);
    917921    ASSERT(poseView->ViewMode() != kListMode);
    918922
    919923    BRect rect;
     
    921925    if (poseView->ViewMode() == kIconMode) {
    922926        rect.left = location.x;
    923927        rect.right = rect.left + poseView->IconSizeInt();
    924 
     928       
     929        printf("first column: %lu\n", poseView->FirstColumn()->AttrHash());
    925930        BTextWidget *widget = WidgetFor(poseView->FirstColumn()->AttrHash());
    926931        if (widget) {
    927932            float textWidth = ceilf(widget->TextWidth(poseView) + 1);