Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

SAP: Fix eventFilter missing FocusIn events and causing bar to be unmoveable

Emmet O'Neill433d716688f0
diff --git a/libs/ui/kis_selection_actions_panel.cpp b/libs/ui/kis_selection_actions_panel.cpp
index 3662516bca..04cf21cbcf 100644
--- a/libs/ui/kis_selection_actions_panel.cpp
+++ b/libs/ui/kis_selection_actions_panel.cpp
@@ -170,6 +170,12 @@ void KisSelectionActionsPanel::setEnabled(bool enabled)
bool KisSelectionActionsPanel::eventFilter(QObject *obj, QEvent *event)
{
bool eventHandled = false;
+
+ bool focusInEvent = event->type() == QEvent::FocusIn;
+ if (focusInEvent && !eventHandled) {
+ eventHandled = true;
+ }
+
// Clicks...
bool clickEvent = event->type() == QEvent::MouseButtonPress || event->type() == QEvent::TabletPress || event->type() == QEvent::TouchBegin;
if (clickEvent && !eventHandled ) {