Qt: only half of enabled/disabled protocols list is processed
In Only enabled/disabled protocols lists, the rowCount decreases as item state is changed in the parent. An equlibrium point is reached at halfway when rows processed == remaining size of list. Grab a static rowcount before entering the loop.
This commit is contained in:
parent
223748d23c
commit
248955d614
|
@ -484,7 +484,8 @@ void EnabledProtocolsProxyModel::setItemsEnable(EnabledProtocolsProxyModel::Enab
|
|||
if (! parent.isValid())
|
||||
beginResetModel();
|
||||
|
||||
for (int row = 0; row < rowCount(parent); row++)
|
||||
int rowcount = rowCount(parent);
|
||||
for (int row = 0; row < rowcount; row++)
|
||||
{
|
||||
QModelIndex idx = index(row, EnabledProtocolsModel::colProtocol, parent);
|
||||
|
||||
|
|
Loading…
Reference in New Issue