MCPcopy Create free account
hub / github.com/KDE/labplot / selectIndex

Method selectIndex

src/frontend/ProjectExplorer.cpp:780–792  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

778}
779
780void ProjectExplorer::selectIndex(const QModelIndex& index) {
781 if (m_project->isLoading())
782 return;
783
784 DEBUG(Q_FUNC_INFO)
785
786 if (!m_treeView->selectionModel()->isSelected(index)) {
787 m_changeSelectionFromView = true;
788 m_treeView->selectionModel()->select(index, QItemSelectionModel::Select | QItemSelectionModel::Rows);
789 m_treeView->setExpanded(index, true);
790 m_treeView->scrollTo(index);
791 }
792}
793
794void ProjectExplorer::deselectIndex(const QModelIndex& index) {
795 if (m_project->isLoading())

Callers

nothing calls this directly

Calls 3

isLoadingMethod · 0.80
selectionModelMethod · 0.80
isSelectedMethod · 0.45

Tested by

no test coverage detected