equal
deleted
inserted
replaced
2780 if (info.first == 0) { |
2780 if (info.first == 0) { |
2781 x = info.bounds.x() + info.spacing; |
2781 x = info.bounds.x() + info.spacing; |
2782 y = info.bounds.y() + info.spacing; |
2782 y = info.bounds.y() + info.spacing; |
2783 items.reserve(rowCount() - hiddenCount()); |
2783 items.reserve(rowCount() - hiddenCount()); |
2784 } else { |
2784 } else { |
2785 const QListViewItem item = items.at(info.first - 1); |
2785 int idx = info.first - 1; |
|
2786 while (idx > 0 && !items.at(idx).isValid()) |
|
2787 --idx; |
|
2788 const QListViewItem &item = items.at(idx); |
2786 x = item.x; |
2789 x = item.x; |
2787 y = item.y; |
2790 y = item.y; |
2788 if (info.flow == QListView::LeftToRight) |
2791 if (info.flow == QListView::LeftToRight) |
2789 x += (info.grid.isValid() ? info.grid.width() : item.w) + info.spacing; |
2792 x += (info.grid.isValid() ? info.grid.width() : item.w) + info.spacing; |
2790 else |
2793 else |
2911 if (info.flow == QListView::LeftToRight) |
2914 if (info.flow == QListView::LeftToRight) |
2912 contentsSize.rheight() += info.spacing; |
2915 contentsSize.rheight() += info.spacing; |
2913 else |
2916 else |
2914 contentsSize.rwidth() += info.spacing; |
2917 contentsSize.rwidth() += info.spacing; |
2915 } |
2918 } |
|
2919 if (rect.size().isEmpty()) |
|
2920 return; |
2916 // resize tree |
2921 // resize tree |
2917 int insertFrom = info.first; |
2922 int insertFrom = info.first; |
2918 if (done || info.first == 0) { |
2923 if (done || info.first == 0) { |
2919 initBspTree(rect.size()); |
2924 initBspTree(rect.size()); |
2920 insertFrom = 0; |
2925 insertFrom = 0; |