improved insert/overwrite functions

This commit is contained in:
itsmattkc
2021-08-28 13:40:27 -07:00
parent a0d7f896c8
commit 5b7255b8bb
6 changed files with 12 additions and 49 deletions
-18
View File
@@ -141,24 +141,6 @@ void ProjectPanel::DeselectAll()
explorer_->DeselectAll();
}
void ProjectPanel::Insert()
{
TimelinePanel* timeline = PanelManager::instance()->MostRecentlyFocused<TimelinePanel>();
if (timeline) {
timeline->InsertFootageAtPlayhead(GetSelectedFootage());
}
}
void ProjectPanel::Overwrite()
{
TimelinePanel* timeline = PanelManager::instance()->MostRecentlyFocused<TimelinePanel>();
if (timeline) {
timeline->OverwriteFootageAtPlayhead(GetSelectedFootage());
}
}
void ProjectPanel::DeleteSelected()
{
explorer_->DeleteSelected();
-3
View File
@@ -55,9 +55,6 @@ public:
virtual void SelectAll() override;
virtual void DeselectAll() override;
virtual void Insert() override;
virtual void Overwrite() override;
virtual void DeleteSelected() override;
public slots:
-18
View File
@@ -101,24 +101,6 @@ void TimelinePanel::DecreaseTrackHeight()
timeline_widget()->DecreaseTrackHeight();
}
void TimelinePanel::Insert()
{
FootageManagementPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<FootageManagementPanel>();
if (project_panel) {
InsertFootageAtPlayhead(project_panel->GetSelectedFootage());
}
}
void TimelinePanel::Overwrite()
{
FootageManagementPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<FootageManagementPanel>();
if (project_panel) {
OverwriteFootageAtPlayhead(project_panel->GetSelectedFootage());
}
}
void TimelinePanel::ToggleLinks()
{
timeline_widget()->ToggleLinksOnSelected();
-4
View File
@@ -66,10 +66,6 @@ public:
virtual void DecreaseTrackHeight() override;
virtual void Insert() override;
virtual void Overwrite() override;
virtual void ToggleLinks() override;
virtual void CutSelected() override;
-4
View File
@@ -124,10 +124,6 @@ public:
virtual void RippleDelete(){}
virtual void Insert(){}
virtual void Overwrite(){}
virtual void IncreaseTrackHeight(){}
virtual void DecreaseTrackHeight(){}
+12 -2
View File
@@ -526,12 +526,22 @@ void MainMenu::DeselectAllTriggered()
void MainMenu::InsertTriggered()
{
PanelManager::instance()->CurrentlyFocused()->Insert();
FootageManagementPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<FootageManagementPanel>();
TimelinePanel *timeline_panel = PanelManager::instance()->MostRecentlyFocused<TimelinePanel>();
if (project_panel && timeline_panel) {
timeline_panel->InsertFootageAtPlayhead(project_panel->GetSelectedFootage());
}
}
void MainMenu::OverwriteTriggered()
{
PanelManager::instance()->CurrentlyFocused()->Overwrite();
FootageManagementPanel* project_panel = PanelManager::instance()->MostRecentlyFocused<FootageManagementPanel>();
TimelinePanel *timeline_panel = PanelManager::instance()->MostRecentlyFocused<TimelinePanel>();
if (project_panel && timeline_panel) {
timeline_panel->OverwriteFootageAtPlayhead(project_panel->GetSelectedFootage());
}
}
void MainMenu::RippleToInTriggered()