Группа :: Система/Библиотеки
Пакет: qt4
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: 0145-qabstractitemview-dropindicator.diff
qt-bugs@ issue : N132275
Trolltech task ID : 132484
applied: no
author: David Faure
When selecting a bunch of icons in a QListView in icon mode, and dragging them around in the
view, there is sometimes one black pixel that is drawn in the topleft corner of the icons being
moved, and that pixel isn't getting erased, so one ends up with some kind of "freestyle drawing"
with a 1-pixel-wide black pen. Fix will be in Qt-4.2.1.
--- src/gui/itemviews/qabstractitemview_p.h
+++ src/gui/itemviews/qabstractitemview_p.h
@@ -125,10 +125,13 @@
inline void paintDropIndicator(QPainter *painter)
{
- if (showDropIndicator && state == QAbstractItemView::DraggingState)
+ if (showDropIndicator && state == QAbstractItemView::DraggingState &&
+ !dropIndicatorRect.isNull())
+ {
if (dropIndicatorRect.height() == 0) // FIXME: should be painted by style
painter->drawLine(dropIndicatorRect.topLeft(), dropIndicatorRect.topRight());
else painter->drawRect(dropIndicatorRect);
+ }
}
#endif