projectexplorer: focus footage panel when opening media there

This commit is contained in:
itsmattkc
2022-08-21 09:53:44 -07:00
parent b169ad923c
commit e7799c9284
+4 -1
View File
@@ -174,7 +174,10 @@ void ProjectPanel::ItemDoubleClickSlot(Node *item)
Core::instance()->DialogImportShow();
} else if (dynamic_cast<Footage*>(item)) {
// Open this footage in a FootageViewer
PanelManager::instance()->MostRecentlyFocused<FootageViewerPanel>()->ConnectViewerNode(static_cast<Footage*>(item));
auto panel = PanelManager::instance()->MostRecentlyFocused<FootageViewerPanel>();
panel->ConnectViewerNode(static_cast<Footage*>(item));
panel->raise();
panel->setFocus();
} else if (dynamic_cast<Sequence*>(item)) {
// Open this sequence in the Timeline
Core::instance()->main_window()->OpenSequence(static_cast<Sequence*>(item));