-// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
for (int i = 1; i < indexes.size(); ++i)
{
idx=indexes.at(i);
- if(idx.parent().internalId()==last.parent().internalId() && idx.row()==last.row()+1 && idx.column()==last.column())
+ // The indexes must have the same parent to be selected
+ if(idx.parent()==last.parent() &&
+ idx.row()==last.row()+1 && idx.column()==last.column())
{
// index is contiguous to last: extend the range
last=idx;