From 5d092e27c037e9358e23504c6686ef6b26626378 Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Tue, 6 May 2008 23:20:10 +0000 Subject: [PATCH] mapping correction --- hurricane/src/hinspector/HInspectorWidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hurricane/src/hinspector/HInspectorWidget.cpp b/hurricane/src/hinspector/HInspectorWidget.cpp index 574915b5..0d3ae95e 100644 --- a/hurricane/src/hinspector/HInspectorWidget.cpp +++ b/hurricane/src/hinspector/HInspectorWidget.cpp @@ -83,12 +83,13 @@ void HInspectorWidget::keyPressEvent(QKeyEvent *event) { if (event->matches(QKeySequence::MoveToNextChar)) { QModelIndex index = slotsView->currentIndex(); if (index.isValid()) { - unsigned row = index.row(); QSortFilterProxyModel* sortModel = static_cast(slotsView->model()); + QModelIndex modelIndex = sortModel->mapToSource(index); RecordModel* recordModel = static_cast(sortModel->sourceModel()); Record* record = recordModel->getRecord(); + unsigned row = modelIndex.row(); Slot* slot = record->getSlot(row); if (slot) { Record* newRecord = slot->getDataRecord();