Changeset 100092 in vbox
- Timestamp:
- Jun 7, 2023 10:26:43 AM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/viso/UIVisoContentBrowser.cpp
r100082 r100092 731 731 bDuplicate = true; 732 732 } 733 QString strNewPath = UIPathOperations::mergePaths(pItem->parentItem()->path(), pItem->name()); 733 734 734 735 if (bDuplicate) … … 737 738 pItem->setData(strOldName, static_cast<int>(UICustomFileSystemModelData_Name)); 738 739 } 739 740 pItem->setData(UIPathOperations::mergePaths(pItem->parentItem()->path(), pItem->name()), UICustomFileSystemModelData_ISOPath); 740 else 741 { 742 /* In case renaming is done (no dublicates) then modify the map that holds VISO items by: 743 adding the renamed item, removing the old one (if it exists) and also add a :remove: to 744 VISO file for the old path since in some cases, when remaned item is not top level, it still 745 appears in ISO. So we remove it explicitly: */ 746 QString oldItemPath = pItem->data(UICustomFileSystemModelData_ISOPath).toString(); 747 m_entryMap.insert(strNewPath, pItem->data(UICustomFileSystemModelData_LocalPath).toString()); 748 m_entryMap.remove(oldItemPath); 749 if (!pItem->data(UICustomFileSystemModelData_LocalPath).toString().isEmpty()) 750 m_entryMap.insert(oldItemPath, ":remove:"); 751 } 752 753 pItem->setData(strNewPath, UICustomFileSystemModelData_ISOPath); 754 741 755 if (m_pTableProxyModel) 742 756 m_pTableProxyModel->invalidate(); 757 758 743 759 } 744 760
Note:
See TracChangeset
for help on using the changeset viewer.