fixed keyboard shortcut implementation

This commit is contained in:
itsmattkc
2019-09-26 04:09:45 +10:00
parent 00d3932194
commit f52c60c26e
7 changed files with 56 additions and 51 deletions
+12
View File
@@ -20,6 +20,8 @@
#include "panelmanager.h"
#include "config/config.h"
PanelManager* olive::panel_manager = nullptr;
PanelManager::PanelManager(QObject *parent) :
@@ -43,6 +45,16 @@ const QList<PanelWidget *> &PanelManager::panels()
PanelWidget *PanelManager::CurrentlyFocused() const
{
// If hover focus is enabled, find the currently hovered panel and return it (if no panel is hovered, resort to
// default behavior)
if (Config::Current()["HoverFocus"].toBool()) {
PanelWidget* hovered = CurrentlyHovered();
if (hovered != nullptr) {
return hovered;
}
}
if (focus_history_.isEmpty()) {
return nullptr;
}