This commit is contained in:
itsmattkc
2020-04-16 12:21:09 +10:00
10 changed files with 124 additions and 21 deletions
@@ -32,6 +32,7 @@
#include "dialog/footageproperties/footageproperties.h"
#include "dialog/sequence/sequence.h"
#include "widget/menu/menu.h"
#include "window/mainwindow/mainwindow.h"
OLIVE_NAMESPACE_ENTER
@@ -422,6 +423,15 @@ void ProjectExplorer::DeleteSelected()
foreach (Item* item, selected) {
ItemPtr item_ptr = item->get_shared_ptr();
// If this is a sequence, close it
if (item_ptr->type() == Item::kSequence) {
Sequence* s = static_cast<Sequence*>(item_ptr.get());
if (Core::instance()->main_window()->IsSequenceOpen(s)) {
Core::instance()->main_window()->CloseSequence(s);
}
}
new ProjectViewModel::RemoveItemCommand(&model_, item_ptr, command);
}