Skip to content

Commit 5ed9228

Browse files
rodlieacolwell
authored andcommitted
Gui/DopeSheet: add parent QModelIndex
Should fix issue #1052
1 parent f605382 commit 5ed9228

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Gui/DopeSheetHierarchyView.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ HierarchyViewSelectionModel::selectChildren(const QModelIndex &index,
130130
QItemSelection *selection) const
131131
{
132132
int row = 0;
133-
QModelIndex childIndex = index.model()->index(row, 0);
133+
QModelIndex childIndex = index.model()->index(row, 0, index);
134134

135135
while ( childIndex.isValid() ) {
136136
if ( !selection->contains(childIndex) ) {
@@ -143,7 +143,7 @@ HierarchyViewSelectionModel::selectChildren(const QModelIndex &index,
143143
}
144144

145145
++row;
146-
childIndex = index.model()->index(row, 0);
146+
childIndex = index.model()->index(row, 0, index);
147147
}
148148
}
149149

@@ -187,7 +187,7 @@ HierarchyViewSelectionModel::checkParentsSelectedStates(const QModelIndex &index
187187
QModelIndex index = (*it);
188188
bool selectParent = true;
189189
int row = 0;
190-
QModelIndex childIndexIt = index.model()->index(row, 0);
190+
QModelIndex childIndexIt = index.model()->index(row, 0, index);
191191

192192
while ( childIndexIt.isValid() ) {
193193
if ( childIndexIt.data(QT_ROLE_CONTEXT_IS_ANIMATED).toBool() ) {
@@ -199,7 +199,7 @@ HierarchyViewSelectionModel::checkParentsSelectedStates(const QModelIndex &index
199199
}
200200

201201
++row;
202-
childIndexIt = index.model()->index(row, 0);
202+
childIndexIt = index.model()->index(row, 0, index);
203203
}
204204

205205
if ( (flags & QItemSelectionModel::Select && selectParent) ) {

0 commit comments

Comments
 (0)