mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Approach to fix "Q_ASSERT(found != end1);" assert as reported by RP
https://swift-project.slack.com/archives/G96QTUBEG/p1546880962000700
This commit is contained in:
committed by
Mat Sutcliffe
parent
ed2acf4d74
commit
33a3984588
@@ -466,12 +466,17 @@ namespace BlackGui
|
||||
|
||||
QModelIndexList CViewBaseNonTemplate::selectedRows() const
|
||||
{
|
||||
return this->selectionModel()->selectedRows();
|
||||
// make sure this is ordered by row and wee keep the same order as in unselectedRows
|
||||
// if we'd know for sure the indexes are always sorted we can remove the sorting here
|
||||
// Qt docu selectedIndexes: Returns a list of all selected model item indexes. The list contains no duplicates, and is not sorted.
|
||||
QModelIndexList indexes = this->selectionModel()->selectedRows();
|
||||
qSort(indexes);
|
||||
return indexes;
|
||||
}
|
||||
|
||||
QModelIndexList CViewBaseNonTemplate::unselectedRows() const
|
||||
{
|
||||
QModelIndexList selected = this->selectedRows();
|
||||
const QModelIndexList selected = this->selectedRows();
|
||||
QModelIndexList unselected;
|
||||
const int rows = this->rowCount();
|
||||
for (int r = 0; r < rows; r++)
|
||||
|
||||
Reference in New Issue
Block a user