Try to force a repaint on selection changed.

This commit is contained in:
Teo Mrnjavac 2016-01-13 14:50:08 +01:00
parent f84fce31a5
commit 55c52e654a
2 changed files with 13 additions and 0 deletions

View File

@ -494,6 +494,17 @@ PartitionLabelsView::setCustomNewRootLabel( const QString& text )
}
void
PartitionLabelsView::setSelectionModel( QItemSelectionModel* selectionModel )
{
connect( selectionModel, &QItemSelectionModel::selectionChanged,
this, [=]
{
viewport()->repaint();
} );
}
QModelIndex
PartitionLabelsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
{

View File

@ -49,6 +49,8 @@ public:
void setCustomNewRootLabel( const QString& text );
void setSelectionModel( QItemSelectionModel* selectionModel ) override;
protected:
// QAbstractItemView API
QRegion visualRegionForSelection( const QItemSelection& selection ) const override;