timeline: use similar reverse strategy for inserting/overwriting from

the most recently focused project panel
This commit is contained in:
itsmattkc
2020-03-03 20:13:58 +11:00
parent c1680ad420
commit 2f7819d0ae
4 changed files with 32 additions and 2 deletions
+21
View File
@@ -20,6 +20,9 @@
#include "timeline.h"
#include "panel/panelmanager.h"
#include "panel/project/project.h"
TimelinePanel::TimelinePanel(QWidget *parent) :
TimeBasedPanel(parent)
{
@@ -89,6 +92,24 @@ void TimelinePanel::DecreaseTrackHeight()
static_cast<TimelineWidget*>(GetTimeBasedWidget())->DecreaseTrackHeight();
}
void TimelinePanel::Insert()
{
ProjectPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<ProjectPanel>();
if (project_panel) {
InsertFootageAtPlayhead(project_panel->GetSelectedFootage());
}
}
void TimelinePanel::Overwrite()
{
ProjectPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<ProjectPanel>();
if (project_panel) {
OverwriteFootageAtPlayhead(project_panel->GetSelectedFootage());
}
}
void TimelinePanel::InsertFootageAtPlayhead(const QList<Footage *> &footage)
{
static_cast<TimelineWidget*>(GetTimeBasedWidget())->InsertFootageAtPlayhead(footage);