Repaint viewport on selection change.
This commit is contained in:
parent
ef0d46dd93
commit
10c51528a9
@ -1,7 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -385,6 +385,18 @@ PartitionBarsView::scrollTo( const QModelIndex& index, ScrollHint hint )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
PartitionBarsView::setSelectionModel( QItemSelectionModel* selectionModel )
|
||||||
|
{
|
||||||
|
QAbstractItemView::setSelectionModel( selectionModel );
|
||||||
|
connect( selectionModel, &QItemSelectionModel::selectionChanged,
|
||||||
|
this, [=]
|
||||||
|
{
|
||||||
|
viewport()->repaint();
|
||||||
|
} );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QModelIndex
|
QModelIndex
|
||||||
PartitionBarsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
|
PartitionBarsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
/* === This file is part of Calamares - <http://github.com/calamares> ===
|
||||||
*
|
*
|
||||||
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
* Copyright 2014, Aurélien Gâteau <agateau@kde.org>
|
||||||
* Copyright 2015, Teo Mrnjavac <teo@kde.org>
|
* Copyright 2015-2016, Teo Mrnjavac <teo@kde.org>
|
||||||
*
|
*
|
||||||
* Calamares is free software: you can redistribute it and/or modify
|
* Calamares is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -46,6 +46,8 @@ public:
|
|||||||
QRect visualRect( const QModelIndex& index ) const override;
|
QRect visualRect( const QModelIndex& index ) const override;
|
||||||
void scrollTo( const QModelIndex& index, ScrollHint hint = EnsureVisible ) override;
|
void scrollTo( const QModelIndex& index, ScrollHint hint = EnsureVisible ) override;
|
||||||
|
|
||||||
|
void setSelectionModel( QItemSelectionModel* selectionModel ) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// QAbstractItemView API
|
// QAbstractItemView API
|
||||||
QRegion visualRegionForSelection( const QItemSelection& selection ) const override;
|
QRegion visualRegionForSelection( const QItemSelection& selection ) const override;
|
||||||
|
Loading…
Reference in New Issue
Block a user