panels: allow insert and overwrite from footageviewerpanel too

Makes FootageViewerPanel and ProjectPanel derive from a common base that
TimelinePanel searches for when looking for a source to insert/overwrite from.
This commit is contained in:
itsmattkc
2020-03-03 20:26:01 +11:00
parent 2f7819d0ae
commit 0bca86e3c7
6 changed files with 29 additions and 6 deletions
+3 -3
View File
@@ -21,7 +21,7 @@
#include "timeline.h"
#include "panel/panelmanager.h"
#include "panel/project/project.h"
#include "panel/project/footagemanagementpanel.h"
TimelinePanel::TimelinePanel(QWidget *parent) :
TimeBasedPanel(parent)
@@ -94,7 +94,7 @@ void TimelinePanel::DecreaseTrackHeight()
void TimelinePanel::Insert()
{
ProjectPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<ProjectPanel>();
FootageManagementPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<FootageManagementPanel>();
if (project_panel) {
InsertFootageAtPlayhead(project_panel->GetSelectedFootage());
@@ -103,7 +103,7 @@ void TimelinePanel::Insert()
void TimelinePanel::Overwrite()
{
ProjectPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<ProjectPanel>();
FootageManagementPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<FootageManagementPanel>();
if (project_panel) {
OverwriteFootageAtPlayhead(project_panel->GetSelectedFootage());