How to remove a category

I can create a new category with

var nId = App.getAssetMgr().findCategoryID("New Cat", false, true);

But how to remove it?

Comments

  • OmnifluxOmniflux Posts: 427

    The only remove methods AssetMgr has are

    • removeOrphanedAssetReferences(DzAssetList)
    • removeStore(QString)

    (undocumented)

    • removeAndCleanBasePath(quint32)
    • removeAndCleanBasePathByRowID(RowIDType)
    • removeCustomerByRowId(RowIDType)

    One of the undocumented BasePath methods might be what you are looking for (I would guess ByRowID if one is), but I think a more likely candidate is passing the appropriate DzCategoryAssetContainer to DzAbstractAssetContainer::removeChildContainer.

  • kabexefkabexef Posts: 93

    Omniflux said:

    The only remove methods AssetMgr has are

    • removeOrphanedAssetReferences(DzAssetList)
    • removeStore(QString)

    (undocumented)

    • removeAndCleanBasePath(quint32)
    • removeAndCleanBasePathByRowID(RowIDType)
    • removeCustomerByRowId(RowIDType)

    One of the undocumented BasePath methods might be what you are looking for (I would guess ByRowID if one is), but I think a more likely candidate is passing the appropriate DzCategoryAssetContainer to DzAbstractAssetContainer::removeChildContainer.

    Thanks a lot, removeChildContainer works.

Sign In or Register to comment.