When derived classes overwrite KCategorizedView::visualRect() to adjust the visual width or height, drawing errors occur as internally always d->visualRect() is used -> always use KCategorizedView::visualRect()...

svn path=/trunk/KDE/kdebase/apps/; revision=689662
This commit is contained in:
Peter Penz 2007-07-18 20:34:40 +00:00
parent 43b2b591ec
commit 381b494e6c

View file

@ -635,7 +635,7 @@ void KCategorizedView::paintEvent(QPaintEvent *event)
foreach (const QModelIndex &index, dirtyIndexes)
{
option.state = state;
option.rect = d->visualRect(index);
option.rect = visualRect(index);
if (selectionModel() && selectionModel()->isSelected(index))
{
@ -935,7 +935,7 @@ void KCategorizedView::mouseReleaseEvent(QMouseEvent *event)
d->lastSelection = selectionModel()->selection();
if (d->hovered.isValid())
viewport()->update(d->visualRect(d->hovered));
viewport()->update(visualRect(d->hovered));
else if (!d->hoveredCategory.isEmpty())
viewport()->update(d->categoryVisualRect(d->hoveredCategory));
}