Skip to content

Commit

Permalink
fix model focus on change to labels
Browse files Browse the repository at this point in the history
  • Loading branch information
elecpower committed Aug 24, 2023
1 parent 9a919ae commit 134aeb9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion companion/src/labels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void LabelsModel::buildLabelsList()
}

if (i) {
emit dataChanged(index(0,0), index(i - 1, 0));
emit dataChanged(index(0, 0), index(i - 1, 0));
}
}

Expand Down
3 changes: 2 additions & 1 deletion companion/src/mdichild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1757,7 +1757,8 @@ void MdiChild::modelLabelsChanged(int index)
{
setWindowModified(true);
refresh();
ui->modelsList->selectionModel()->select(modelsListModel->getIndexForModel(index), QItemSelectionModel::ClearAndSelect |
const QModelIndex idx = modelsListProxyModel->mapFromSource(modelsListModel->getIndexForModel(index));
ui->modelsList->selectionModel()->select(idx, QItemSelectionModel::ClearAndSelect |
QItemSelectionModel::Rows);
}

Expand Down

0 comments on commit 134aeb9

Please sign in to comment.