forked from openkylin/qt5-ukui-platformtheme
fix bug#159313 listview在选中后会repaint,与文管删除后坐标更新共同作用,导致界面闪
This commit is contained in:
parent
be15db684b
commit
503dfe4604
|
@ -585,7 +585,15 @@ void Qt5UKUIStyle::polish(QWidget *widget)
|
|||
if(listview != nullptr)
|
||||
{
|
||||
connect(listview->selectionModel(), &QItemSelectionModel::selectionChanged, [listview](const QItemSelection &selected, const QItemSelection &deselected){
|
||||
listview->repaint();
|
||||
if(!selected.empty() && !deselected.empty())
|
||||
{
|
||||
listview->repaint();
|
||||
|
||||
// int row = listview->currentIndex().row();
|
||||
// int column = listview->currentIndex().column();
|
||||
// if(listview->indexWidget(listview->model()->index(row, column)))//widget is null
|
||||
// listview->indexWidget(listview->model()->index(row, column))->repaint();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1819,7 +1827,7 @@ void Qt5UKUIStyle::drawPrimitive(QStyle::PrimitiveElement element, const QStyleO
|
|||
selectIndexList.append(i);
|
||||
}
|
||||
// qDebug() << "selectIndexList...." << selectIndexList;
|
||||
if(selectIndexList.contains(currentIndex - 1) && selectIndexList.contains(currentIndex +1))
|
||||
if(selectIndexList.contains(currentIndex - 1) && selectIndexList.contains(currentIndex +1) && selectIndexList.contains(currentIndex))
|
||||
mid = true;
|
||||
else if(selectIndexList.contains(currentIndex - 1))
|
||||
end = true;
|
||||
|
|
Loading…
Reference in New Issue