diff --git a/app/widget/projectexplorer/projectexplorer.cpp b/app/widget/projectexplorer/projectexplorer.cpp index 419f6a1ea..0694185e3 100644 --- a/app/widget/projectexplorer/projectexplorer.cpp +++ b/app/widget/projectexplorer/projectexplorer.cpp @@ -537,7 +537,7 @@ void ProjectExplorer::DeselectAll() CurrentView()->selectionModel()->clearSelection(); } -QList ProjectExplorer::GetItemNodes(Item* item, Item::Type type) +QList ProjectExplorer::GetFootageNodes(Item* item) { // Output list list QList nodes; @@ -547,7 +547,7 @@ QList ProjectExplorer::GetItemNodes(Item* item, Item::Type type) // Get item pointer. ItemPtr item_ptr = item->get_shared_ptr(); - if (type == Item::kFootage) { + if (item_ptr.get()->type() == Item::kFootage) { // If no sequences exist we don't need to do anything clever here if (!sequences.isEmpty()) { // Footage can contain multiple streams, all of which need to be dealt with @@ -621,7 +621,7 @@ void ProjectExplorer::DeleteSelected() if (item_ptr->type() == Item::kFootage) { // Check if nodes exists - QList nodes = GetItemNodes(item, Item::kFootage); + QList nodes = GetFootageNodes(item); if (!nodes.isEmpty()){ FootageDeleteResponse response = DeleteWarningMessage(); if (response == kOffline) { diff --git a/app/widget/projectexplorer/projectexplorer.h b/app/widget/projectexplorer/projectexplorer.h index 0e69b427c..12c999d5e 100644 --- a/app/widget/projectexplorer/projectexplorer.h +++ b/app/widget/projectexplorer/projectexplorer.h @@ -117,9 +117,9 @@ private: /** * @brief Check if an item is in use anywhere and return any relevant input nodes - * kFootage has two streams that need to be handled + * Returns a QList as Footage has two streams that need to be handled */ - QList GetItemNodes(Item* item, Item::Type type); + QList GetFootageNodes(Item* item); /** * @brief Simple convenience function for adding a view to this stacked widget