-
-void TreeViewSidebarPage::loadSubTree()
-{
- m_treeView->selectionModel()->clearSelection();
-
- if (m_leafDir.isParentOf(m_dirLister->url())) {
- // The leaf directory is not a child of the base URL, hence
- // no sub directory must be loaded or selected.
- return;
- }
-
- const QModelIndex index = m_dolphinModel->indexForUrl(m_leafDir);
- if (index.isValid()) {
- selectLeafDirectory();
- } else {
- // Load all sub directories that need to get expanded for making
- // the leaf directory visible. The slot triggerExpanding() will
- // get invoked if the expanding has been finished.
- m_dolphinModel->expandToUrl(m_leafDir);
- }
-}
-