Changeset 96767 in vbox
- Timestamp:
- Sep 16, 2022 12:10:55 PM (2 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium/viso
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp
r96407 r96767 164 164 prepareObjects(); 165 165 prepareConnections(); 166 167 /* Assuming the root items only child is the one with the path '/', navigate into it. */ 168 /* Hack alert. for some reason without invalidating proxy models mapFromSource return invalid index. */ 169 if (m_pTableProxyModel) 170 m_pTableProxyModel->invalidate(); 171 if (m_pTreeProxyModel) 172 m_pTreeProxyModel->setSourceModel(m_pModel); 173 if (rootItem() && rootItem()->childCount() > 0) 174 { 175 UICustomFileSystemItem *pStartItem = static_cast<UICustomFileSystemItem*>(rootItem()->children()[0]); 176 if (pStartItem) 177 { 178 QModelIndex iindex = m_pModel->index(pStartItem); 179 if (iindex.isValid()) 180 tableViewItemDoubleClick(convertIndexToTableIndex(iindex)); 181 } 182 } 166 183 } 167 184 … … 472 489 const QString startPath = QString("/%1").arg(m_strVisoName); 473 490 474 UICustomFileSystemItem * startItem = new UICustomFileSystemItem(startPath, rootItem(), KFsObjType_Directory);475 startItem->setPath("/");476 startItem->setIsOpened(false);491 UICustomFileSystemItem *pStartItem = new UICustomFileSystemItem(startPath, rootItem(), KFsObjType_Directory); 492 pStartItem->setPath("/"); 493 pStartItem->setIsOpened(false); 477 494 } 478 495 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.h
r96407 r96767 93 93 94 94 virtual void treeSelectionChanged(const QModelIndex &selectedTreeIndex) final override; 95 95 96 96 private slots: 97 97
Note:
See TracChangeset
for help on using the changeset viewer.